From: Bill Erickson Date: Wed, 5 Apr 2017 15:15:58 +0000 (-0400) Subject: LP#1642086 Move inline JS install readme X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fberick%2Flp1642086-move-jquery;p=working%2FEvergreen.git LP#1642086 Move inline JS install readme Move the helpful JS dependencies installation README into the new JS common directory where the steps take place. Rename file to INSTALL.adoc to better specificy its purpose and scope. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/common/INSTALL.adoc b/Open-ILS/web/js/ui/default/common/INSTALL.adoc new file mode 100644 index 0000000000..3d0c57ad0d --- /dev/null +++ b/Open-ILS/web/js/ui/default/common/INSTALL.adoc @@ -0,0 +1,104 @@ += Building, Testing, Packaging the Browser Client = +:Author: Bill Erickson +:Email: berick@esilibrary.com +:Date: 2014-05-07 + +== Prerequisites == + + * 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 + +=== Install Node.js === + +[source,sh] +------------------------------------------------------------------------------ +% sudo apt-get install nodejs-legacy + +# update packages +% sudo npm update +------------------------------------------------------------------------------ + +=== Install Grunt CLI === + +[source,sh] +------------------------------------------------------------------------------ +% 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: + +[source,sh] +------------------------------------------------------------------------------ +% cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/common/ +------------------------------------------------------------------------------ + +=== Install Project-local Dependencies === + +npm inspects the 'package.json' file for dependencies and fetches them +from the Node package network. + +[source,sh] +------------------------------------------------------------------------------ +% npm install # fetch Grunt dependencies +% bower install # fetch JS dependencies +------------------------------------------------------------------------------ + +=== Running the Build Scripts === + +[source,sh] +------------------------------------------------------------------------------ + +# build, run tests +% grunt test + +# build, concat+minify +% grunt uglify + +# build, run tests, concat+minify +% grunt all +------------------------------------------------------------------------------ + +== Updating Dependencies + + * Remove the contents of the "dependencies" {} in bowser.json + * rm -r bower_components + * Re-install all dependencies: + +[source,sh] +------------------------------------------------------------------------------ +bower install --save angular-latest +bower install --save jquery +bower install --save bootstrap +bower install --save angular-route +bower install --save angular-mocks +bower install --save angular-bootstrap +bower install --save angular-hotkeys +bower install --save angular-file-saver +bower install --save angular-location-update +# ... others as needed +------------------------------------------------------------------------------ + +== TODO == + + * 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)? + diff --git a/Open-ILS/web/js/ui/default/staff/README.install b/Open-ILS/web/js/ui/default/staff/README.install deleted file mode 100644 index ba0a91285a..0000000000 --- a/Open-ILS/web/js/ui/default/staff/README.install +++ /dev/null @@ -1,113 +0,0 @@ -= Building, Testing, Packaging the Browser Client = -:Author: Bill Erickson -:Email: berick@esilibrary.com -:Date: 2014-05-07 - -== Prerequisites == - - * 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 - -=== 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 -https://github.com/joyent/node/wiki/installation[Node.js Installation] - -[source,sh] ------------------------------------------------------------------------------- -% git clone https://github.com/joyent/node.git -% cd node -% git checkout -b v0.10.28 v0.10.28 - -# set -j to number of CPU cores + 1 -% ./configure && make -j5 && sudo make install - -# update packages -% sudo npm update ------------------------------------------------------------------------------- - -=== Install Grunt CLI === - -[source,sh] ------------------------------------------------------------------------------- -% 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: - -[source,sh] ------------------------------------------------------------------------------- -% cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/staff/ ------------------------------------------------------------------------------- - -=== Install Project-local Dependencies === - -npm inspects the 'package.json' file for dependencies and fetches them -from the Node package network. - -[source,sh] ------------------------------------------------------------------------------- -% npm install # fetch Grunt dependencies -% bower install # fetch JS dependencies ------------------------------------------------------------------------------- - -=== Running the Build Scripts === - -[source,sh] ------------------------------------------------------------------------------- - -# build, run tests -% grunt test - -# build, concat+minify -% grunt uglify - -# build, run tests, concat+minify -% grunt all ------------------------------------------------------------------------------- - -== Updating Dependencies - - * Remove the contents of the "dependencies" {} in bowser.json - * rm -r bower_components - * Re-install all dependencies: - -[source,sh] ------------------------------------------------------------------------------- -bower install --save angular-latest -bower install --save jquery -bower install --save bootstrap -bower install --save angular-route -bower install --save angular-mocks -bower install --save angular-bootstrap -bower install --save angular-hotkeys -bower install --save angular-file-saver -bower install --save angular-location-update -# ... others as needed ------------------------------------------------------------------------------- - -== TODO == - - * 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)? -