1 = Building, Testing, Packaging the Browser Client =
3 :Email: berick@esilibrary.com
8 * http://bower.io/[Bower]
9 ** Dependency retrieval
10 * http://jasmine.github.io/[Jasmine]
11 ** Headless unit tests runner
12 * http://gruntjs.com/[Grunt]
13 ** Coordinating the build
14 ** Concatenation + minification of JS and CSS
16 These are all Node.js plugins, so start by installing Node.js
18 === Install Node.js ===
20 Node.js does not have have Debian Wheezy build target. For now, I've opted
21 to install from source. For more, see also
22 https://github.com/joyent/node/wiki/installation[Node.js Installation]
25 ------------------------------------------------------------------------------
26 % git clone https://github.com/joyent/node.git
28 % git checkout -b v0.10.28 v0.10.28
30 # set -j to number of CPU cores + 1
31 % ./configure && make -j5 && sudo make install
35 ------------------------------------------------------------------------------
37 === Install Grunt CLI ===
40 ------------------------------------------------------------------------------
41 % sudo npm install -g grunt-cli
42 ------------------------------------------------------------------------------
47 ------------------------------------------------------------------------------
48 % sudo npm install -g bower
49 ------------------------------------------------------------------------------
51 == Building, Testing, Minification ==
53 The remaining steps all take place within the staff JS web root:
56 ------------------------------------------------------------------------------
57 % cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/staff/
58 ------------------------------------------------------------------------------
60 === Install Project-local Dependencies ===
62 npm inspects the 'package.json' file for dependencies and fetches them
63 from the Node package network.
66 ------------------------------------------------------------------------------
67 % npm install # fetch Grunt dependencies
68 % bower install # fetch JS dependencies
69 ------------------------------------------------------------------------------
71 === Running the Build Scripts ===
74 ------------------------------------------------------------------------------
79 # build, concat+minify
82 # build, run tests, concat+minify
84 ------------------------------------------------------------------------------
86 == Updating Dependencies
88 * Remove the contents of the "dependencies" {} in bowser.json
89 * rm -r bower_components
90 * Re-install all dependencies:
93 ------------------------------------------------------------------------------
94 bower install --save angular-latest
95 bower install --save jquery
96 bower install --save bootstrap
97 bower install --save angular-route
98 bower install --save angular-mocks
99 bower install --save angular-bootstrap
100 bower install --save angular-hotkeys
101 bower install --save angular-file-saver
102 bower install --save angular-location-update
103 # ... others as needed
104 ------------------------------------------------------------------------------
108 * Minification of app-specific JS files
109 * Integrate this into the Evergreen Makefile test and install targets
110 ** Avoid installing test, node_modules, etc. into the web dir.
111 * Support fetching JS deps (angularjs, etc.) via direct retrieval for
112 installation without test + concat + minify (i.e. w/o requiring Node.js)?