LP#1775466 Angular doc updates
authorBill Erickson <berickxx@gmail.com>
Wed, 5 Sep 2018 15:37:09 +0000 (11:37 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 5 Sep 2018 15:37:09 +0000 (11:37 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/CHEAT_SHEET.adoc
docs/installation/server_installation.adoc

index 11ec9cb..84f4e5d 100644 (file)
@@ -1,68 +1,31 @@
-= Evergreen Angular App Cheatsheet =
+= Evergreen Angular App Cheatsheet
 
-== Install Angular Dependencies
+== Basics
 
 [source,sh]
 ---------------------------------------------------------------------
-$ cd $EVERGREEN/Open-ILS/src/eg2
-$ npm update
-$ npm install
+npm update
+npm install
+ng lint             # check code formatting
+npm run test        # unit tests
+ng build --watch    # compile dev mode
+ng build --prod     # compile production mode
 ---------------------------------------------------------------------
 
-== Compile Angular App -- Dev Mode
-
-* Compile in "dev" mode using the just-in-time (JIT) compiler.
-* Dev mode compilation is faster, but requires the browser fetch
-  and execute a lot more code.
-
-[source,sh]
----------------------------------------------------------------------
-$ ng build [--watch]
----------------------------------------------------------------------
-
-== Compile Angular App -- Prod Mode
-
-* Compile in production mode.  
-* Uses the ahead-of-time (AOT) compiler and other optimizations, which 
-  is slower to compile, but faster to fetch and execute in the browser.
-
-[source,sh]
----------------------------------------------------------------------
-$ ng build --prod
----------------------------------------------------------------------
-
-== Running Unit Tests
-
-[source,sh]
----------------------------------------------------------------------
-# generates the test data and runs 'ng test'
-npm run test
----------------------------------------------------------------------
-
-== Verify Code Formatting
-
-[source,sh]
----------------------------------------------------------------------
-ng lint
----------------------------------------------------------------------
-
-== OPTIONAL: Building for an alternate locale
+== OPTIONAL: Adding a Locale 
 
 * Using fr-CA as an example.
 * An fr-CA configuration is supplied by default.  Additional configs
   must be added where needed.
 * Currently translation builds are only available on --prod build mode.
 * Uncomment the locale lines in eg_vhost.conf and restart apache.
+* TODO: expand docs on package.json file changes required to add locales.
 
 [source,sh]
 ---------------------------------------------------------------------
 npm run export-strings
 npm run merge-strings -- fr-CA
 # APPLY TRANSLATIONS TO src/locale/messages.fr-CA.xlf
-npm run build-fr-CA
+npm run build-fr-CA # modify package.json for other locales
 ---------------------------------------------------------------------
 
-== Access The Interface
-
-Navigate to https://HOSTNAME/eg2/staff/login
-
index df3b055..c057e59 100644 (file)
@@ -142,8 +142,8 @@ Extra steps for web staff client
 Skip this entire section if you are using an official release tarball downloaded
 from http://evergreen-ils.org/downloads
 
-Install dependencies for web staff client
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Install dependencies for AngularJS web staff client
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 [NOTE]
 You may skip this section if you have installed the
@@ -183,6 +183,47 @@ npm run build-prod
 npm run test
 ------------------------------------------------------------------------------
 
+Install dependencies for Angular web staff client
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+[NOTE]
+You may skip this section if you have installed the
+<<optional_developer_additions,optional developer additions>>.  You will still need to do the following
+steps in <<install_files_for_angular_web_staff_client,Install files for web staff client>>.
+
+1. Install the long-term stability (LTS) release of
+https://nodejs.org[Node.js]. Add the Node.js `/bin` directory to your
+environment variable `PATH`.
+
+[[install_files_for_angular_web_staff_client]]
+Install files for web staff client
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+1. Building, Testing, Minification: The remaining steps all take place within
+   the Angalar staff root:
++
+[source,sh]
+------------------------------------------------------------------------------
+cd $EVERGREEN_ROOT/Open-ILS/src/eg2/
+------------------------------------------------------------------------------
++
+2. 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 JS dependencies
+------------------------------------------------------------------------------
++
+3. Run the build script.
++
+[source,sh]
+------------------------------------------------------------------------------
+# build and run tests
+ng build --prod
+npm run test
+------------------------------------------------------------------------------
+
 Configuration and compilation instructions
 ------------------------------------------