From fda1b9276d5b41c9556473d3d4bfb6bb769cdd48 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 15 May 2018 10:27:59 -0400 Subject: [PATCH] LP#1775466 docs Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/README.adoc | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/README.adoc b/Open-ILS/src/eg2/README.adoc index 2e4f209ca0..2f89011806 100644 --- a/Open-ILS/src/eg2/README.adoc +++ b/Open-ILS/src/eg2/README.adoc @@ -1,5 +1,7 @@ = EG Angular2 App = +== Initial Setup + === Apache Configuration === [source,conf] @@ -9,16 +11,49 @@ --------------------------------------------------------------------- +[source,sh] +--------------------------------------------------------------------- +sudo systemctl reload apache2 +--------------------------------------------------------------------- + +=== Dependencies + +* Current angular/cli version is 6.x which requires Node8. Will + resolve as part of the Angular6 update. + +[source,sh] +--------------------------------------------------------------------- +$ sudo npm install -g @angular/cli@1.7.3 +$ cd $EVERGREEN/Open-ILS/src/eg2 +$ npm update +--------------------------------------------------------------------- + === Transpile + Deploy in --watch mode for Dev === +* Development builds +** Using the JIT compiler which is faster to compile, but slower + in the browser. + [source,sh] --------------------------------------------------------------------- -ng build --aot --app eg --deploy-url /eg2/ --base-href /eg2/ --output-path ../../web/eg2/ --watch +$ cd $EVERGREEN/Open-ILS/src/eg2 +$ npm update +$ ng build --app eg --watch --deploy-url /eg2/ --base-href /eg2/ --output-path ../../web/eg2/ +--------------------------------------------------------------------- + +* Production builds +** Using AOT compiler, which is slower to compile, but faster in the browser. + +[source,sh] +--------------------------------------------------------------------- +ng build --app eg --aot --prod --deploy-url /eg2/ --base-href /eg2/ --output-path ../../web/eg2/ --------------------------------------------------------------------- === Link build files into place for ease of dev +* Optionally copy the files into place via 'make install' (or 'cp') + [source,sh] --------------------------------------------------------------------- -sudo -u opensrf ln -s /PATH/TO/Evergreen/Open-ILS/web/eg2 /openils/var/web/eg2 +sudo -u opensrf ln -s $EVERGREEN/Open-ILS/web/eg2 /openils/var/web/eg2 --------------------------------------------------------------------- -- 2.11.0