packaging docs
authorBill Erickson <berick@esilibrary.com>
Thu, 8 May 2014 15:56:30 +0000 (11:56 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 8 May 2014 15:56:30 +0000 (11:56 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/staff/README.install

index 92a1076..62668c1 100644 (file)
@@ -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.<version>.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