From: Bill Erickson Date: Wed, 5 Sep 2018 15:26:03 +0000 (-0400) Subject: LP#1775466 Angular6 updated inline cheat sheet X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=03f469d7a4be7426d7a9e6f92df74eb651e887b2;p=working%2FEvergreen.git LP#1775466 Angular6 updated inline cheat sheet Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/CHEAT_SHEET.adoc b/Open-ILS/src/eg2/CHEAT_SHEET.adoc new file mode 100644 index 0000000000..11ec9cb453 --- /dev/null +++ b/Open-ILS/src/eg2/CHEAT_SHEET.adoc @@ -0,0 +1,68 @@ += Evergreen Angular App Cheatsheet = + +== Install Angular Dependencies + +[source,sh] +--------------------------------------------------------------------- +$ cd $EVERGREEN/Open-ILS/src/eg2 +$ npm update +$ npm install +--------------------------------------------------------------------- + +== 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 + +* 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. + +[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 +--------------------------------------------------------------------- + +== Access The Interface + +Navigate to https://HOSTNAME/eg2/staff/login + diff --git a/Open-ILS/src/eg2/README.adoc b/Open-ILS/src/eg2/README.adoc deleted file mode 100644 index 8a69ae713a..0000000000 --- a/Open-ILS/src/eg2/README.adoc +++ /dev/null @@ -1,115 +0,0 @@ -= Evergreen Angular6 App = - -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. - -== Setup - -=== Apache Configuration === - -Update /etc/apache2/eg_vhost.conf following the changes at the -bottom of Open-ILS/examples/apache_24/eg_vhost.conf.in, starting -with "/eg2/ client setup" - -=== Install Node v8 - -[source,sh] ---------------------------------------------------------------------- -$ cd /tmp -$ 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 'collab/berick/lp1775466-ang6-base-app' @ working but this may change. - -=== Install Angular Dependencies - -[source,sh] ---------------------------------------------------------------------- -$ cd $EVERGREEN/Open-ILS/src/eg2 -$ npm update -$ npm install ---------------------------------------------------------------------- - -=== OPTIONAL: Installing on an existing Evergreen server - -* Rebuild the AngularJS dependencies using Node v8. - -[source,sh] ---------------------------------------------------------------------- -$ cd $EVERGREEN/Open-ILS/web/js/ui/default/staff/ -$ rm -r node_modules -$ npm update -$ npm install -$ npm run build # or build-watch ---------------------------------------------------------------------- - -=== 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 ---------------------------------------------------------------------- - -=== Test code formatting (OPTIONAL) - -[source,sh] ---------------------------------------------------------------------- -ng lint ---------------------------------------------------------------------- - -=== OPTIONAL: Building for an alternate 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. - -[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 ---------------------------------------------------------------------- - -=== Deploy - -Build and install Evergreen code as usual. Restart Evergreen and Apache. - -== Access The Interface - -Navigate to https://HOSTNAME/eg2/staff/login -