From e70cfcb9c4263e9bf57d0950526526c6c90d814a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 8 May 2014 11:56:30 -0400 Subject: [PATCH] packaging docs Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/README.install | 48 +++++++++++-------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/README.install b/Open-ILS/web/js/ui/default/staff/README.install index 92a1076454..62668c1089 100644 --- a/Open-ILS/web/js/ui/default/staff/README.install +++ b/Open-ILS/web/js/ui/default/staff/README.install @@ -5,12 +5,17 @@ == Prerequisites == -=== Install Node.js === + * http://bower.io/[Bower] + ** Dependency retrieval + * http://jasmine.github.io/[Jasmine] + ** Headless unit tests runner + * http://gruntjs.com/[Grunt] + ** Coordinating the build + ** Concatenation + minification of JS and CSS + +These are all Node.js plugins, so start by installing Node.js -http://gruntjs.com/[Grunt] and http://jasmine.github.io/[Jasmine] (and -related bits) allow us to retrieve JS dependencies, run unit tests, and -concatenate + minify JS files on the server. They are both Node.js -plugins. +=== Install Node.js === Node.js does not have have Debian Wheezy build target. For now, I've opted to install from source. For more, see also @@ -36,6 +41,13 @@ https://github.com/joyent/node/wiki/installation[Node.js Installation] % sudo npm install -g grunt-cli ------------------------------------------------------------------------------ +=== Install Bower === + +[source,sh] +------------------------------------------------------------------------------ +% sudo npm install -g bower +------------------------------------------------------------------------------ + == Building, Testing, Minification == The remaining steps all take place within the staff JS web root: @@ -52,31 +64,12 @@ from the Node package network. [source,sh] ------------------------------------------------------------------------------ -% npm install ------------------------------------------------------------------------------- - -=== Generate test IDL2js Output === - -Unit tests require mock data. Some data is provided as static content, -but the IDL JS is generated from the in-repo fm_IDL.xml file via a script: - -[source,sh] ------------------------------------------------------------------------------- -% cd test/data -% ./idl2js.pl -% cd ../../ +% npm install # fetch Grunt dependencies +% bower install # fetch JS dependencies ------------------------------------------------------------------------------ === Running the Build Scripts === - * build : copy needed files (angular, etc.) from the node directories into - our build directory - * test : run unit tests - * concat+minify : concatenate 'core' script files into a single file and - minify the file using Grunt's 'uglify' plugin. This will create a file - at build/evergreen-staff-client..min.js, which contain the - scripts needed for all interfaces. - [source,sh] ------------------------------------------------------------------------------ @@ -92,10 +85,9 @@ but the IDL JS is generated from the in-repo fm_IDL.xml file via a script: == TODO == - * Minification of app-specific files + * Minification of app-specific JS files * Integrate this into the Evergreen Makefile test and install targets ** Avoid installing test, node_modules, etc. into the web dir. * Support fetching JS deps (angularjs, etc.) via direct retrieval for installation without test + concat + minify (i.e. w/o requiring Node.js)? - * CSS minification -- 2.11.0