LP#1775466 Doc updates
authorBill Erickson <berickxx@gmail.com>
Wed, 16 May 2018 15:05:36 +0000 (11:05 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 6 Jun 2018 20:59:39 +0000 (16:59 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/README.adoc

index 5874e69..6c4d961 100644 (file)
@@ -1,13 +1,10 @@
 = Evergreen Angular6 App =
 
-NOTE: Angular v6 requires NodeJS v8.  Node v8 appears to be working fine
+NOTE: Angular v6 requires NodeJS v8.  Node v8 appears to work fine
 with the AngularJS client, but for now, you may wish to build this code
 on a separate VM to avoid disruption.
 
-When installing on an exising machine, remove the 'node_modules' directory
- and run 'npm update ; npm install' before building the AngularJS client.
-
-== Initial Setup
+== Setup
 
 === Apache Configuration ===
 
@@ -20,14 +17,7 @@ When installing on an exising machine, remove the 'node_modules' directory
 </Directory>
 ---------------------------------------------------------------------
 
-* And reload the configuration.
-
-[source,sh]
----------------------------------------------------------------------
-sudo systemctl reload apache2
----------------------------------------------------------------------
-
-=== Install Dependencies
+=== Install Node v8
 
 [source,sh]
 ---------------------------------------------------------------------
@@ -36,40 +26,67 @@ $ wget 'https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz'
 $ sudo tar -C /usr/local --strip-components 1 -xJf node-v8.11.1-linux-x64.tar.xz 
 $ sudo npm update
 $ sudo npm install -g @angular/cli
+---------------------------------------------------------------------
+
+== Install Evergreen
+
+=== Checkout Branch
+
+* Checkout and deploy the working branch as usual.
+* Currently 'user/berick/lp1626157-ang6-app' @ working but this may change.
+
+=== Install Angular Dependencies
+
+[source,sh]
+---------------------------------------------------------------------
 $ cd $EVERGREEN/Open-ILS/src/eg2
 $ npm update
 $ npm install
 ---------------------------------------------------------------------
 
-=== Compile and Deploy -- Dev Mode
+=== OPTIONAL: Installing on an existing Evergreen server
 
-* Uses the JIT compiler which is faster to compile, but slower in the browser.
+* Rebuild the AngularJS dependencies using Node v8.
 
 [source,sh]
 ---------------------------------------------------------------------
-$ ng build --watch --deploy-url /eg2/ --base-href /eg2/ --output-path  ../../web/eg2/
+$ cd $EVERGREEN/Open-ILS/web/js/ui/default/staff/
+$ rm -r node_modules
+$ npm update
+$ npm install
+$ npm run build # or build-watch
 ---------------------------------------------------------------------
 
-=== Compile and Deploy -- Prod Mode
+=== Compile Angular App -- Dev Mode
 
-* Uses the AOT compiler, which is slower to compile, but faster in the browser.
+* Uses the JIT compiler which is faster to compile, but slower in the browser.
+** '--watch' option also supported.
 
 [source,sh]
 ---------------------------------------------------------------------
-$ ng build --aot --prod --deploy-url /eg2/ --base-href /eg2/ --output-path  ../../web/eg2/
+$ ng build --deploy-url /eg2/ --base-href /eg2/ --output-path  ../../web/eg2/
 ---------------------------------------------------------------------
 
-=== Link build files into place for ease of dev
+=== Compile Angular App -- Prod Mode
 
-* Optionally copy the files into place via 'make install' (or 'cp')
+* Uses the AOT compiler, which is slower to compile, but faster in the browser.
 
 [source,sh]
 ---------------------------------------------------------------------
-$ sudo -u opensrf ln -s $EVERGREEN/Open-ILS/web/eg2 /openils/var/web/eg2
+$ ng build --aot --prod --deploy-url /eg2/ --base-href /eg2/ --output-path  ../../web/eg2/
 ---------------------------------------------------------------------
 
+=== Deploy
+
+Build and install Evergreen code as usual.  Restart Evergreen and Apache.
+
 == Access The Interface
 
 Navigate to https://HOSTNAME/eg2/staff/login
 
+=== OPTIONAL: Running on an existing EG server
+
+Clear browser cookies for the EG server domain before logging in.
+The cookie path changes so both /eg/staff and /eg2 can share cookies.
+