Added BUILD file for gui2-fw-lib bazel build

This is another step along the way of having Native Bazel builds for Angular
Not fully there yet - waiting for Angular v9 in next 2 weeks
but don't want to wait that long to merge all of this

For most people the main concern is updates to WORKSPACE

Change-Id: I28170b8f8daaa2959327c259fe6a10df075113bb
diff --git a/web/gui2-fw-lib/BUILD b/web/gui2-fw-lib/BUILD
index 796b46a..5f607a1 100644
--- a/web/gui2-fw-lib/BUILD
+++ b/web/gui2-fw-lib/BUILD
@@ -65,9 +65,9 @@
         [
             ":angular.json",
             ":package.json",
-            ":package-lock.json",
             ":tsconfig.json",
             ":tslint.json",
+            ":yarn.lock",
         ],
 )
 
@@ -174,8 +174,8 @@
     srcs = [
         "@nodejs//:bin/npm",
         "@nodejs//:bin/nodejs/bin/node",
-        "@gui2_npm//:node_modules/@angular/cli/bin/ng",
-        "@gui2_npm//:node_modules",
+        "@npm//:node_modules/@angular/cli/bin/ng",
+        "@npm//:node_modules",
         ":_root_level_files",
     ],
     outs = [
@@ -190,10 +190,10 @@
           " NPM=$(location @nodejs//:bin/npm) &&" +
           " export PATH=$$ROOT/$$(dirname $${NPM}):$$PATH &&" +
           " $$NPM version > $$ROOT/$(location onos-gui2-npm-install.log) 2>&1 &&" +
-          " NM=external/gui2_npm/node_modules &&" +
+          " NM=external/npm/node_modules &&" +
           " echo $$NM > $$ROOT/$(location onos-gui2-npm-install.log) 2>&1 &&" +
           #          " ../../$(location @nodejs//:npm) $$NPM_ARGS install --no-cache >> $$ROOT/$(location onos-gui2-npm-install.log) 2>&1 &&" +
-          " cd external/gui2_npm &&" +
+          " cd external/npm &&" +
           " jar Mcf $$ROOT/$(location onos-gui2-npm-install.jar) node_modules &&" +
           " touch $$ROOT/$(location onos-gui2-npm-install.log)",  # to get the log always as the 2nd file
     message = "NodeJS npm install",
@@ -211,8 +211,8 @@
         "@nodejs//:bin/nodejs/bin/node",
         "@nodejs//:bin/npm",
         ":onos-gui2-fw-npm-install",
-        "@gui2_npm//:node_modules/@angular/cli/bin/ng",
-        "@gui2_npm//:node_modules",
+        "@npm//:node_modules/@angular/cli/bin/ng",
+        "@npm//:node_modules",
         "//web/gui:onos-gui-data-for-gui2",
         ":_root_level_files",
         ":_gui2_fw_lib_src",
@@ -225,7 +225,7 @@
           " export HOME=. &&" +
           " export XDG_CONFIG_HOME=$(@D)/config &&" +
           " NODE=$(location @nodejs//:bin/nodejs/bin/node) &&" +
-          #          " NG=$(location @gui2_npm//:node_modules/@angular/cli/bin/ng) &&" +
+          #          " NG=$(location @npm//:node_modules/@angular/cli/bin/ng) &&" +
           " INSTALL_FILES=($(locations :onos-gui2-fw-npm-install)) &&" +  # An array of filenames - sorted by time created
           " cd web/gui2-fw-lib &&" +
           " jar xf $$ROOT/$${INSTALL_FILES[0]} &&" +
@@ -317,9 +317,9 @@
           "     --watch=false > ../../$(location onos-gui2-fw-ng-test.log) 2>&1 ||" +
           " if [ $$? -eq 0 ]; then echo 'Successfully ran tests';" +
           " else " +
-          "   echo 'Error running \'ng test\' on \'//web/gui2-fw-lib:onos-gui2-fw-ng-test\'. \\\n" +
+          "   echo 'Error running \'ng test\' on \'//web/gui2-fw-lib:_onos-gui2-fw-ng-test\'. \\\n" +
           "     See bazel-out/k8-fastbuild/bin/web/gui2-fw-lib/onos-gui2-fw-ng-test.log for more details' >&2;" +
-          #"   tail -n 100 ../../$(location onos-gui2-fw-ng-test.log) >&2;" +
+          "     cat ../../$(location onos-gui2-fw-ng-test.log) >&2;" +
           "   exit 1;" +
           " fi;",
     message = "GUI FW lib lint and test",
@@ -342,3 +342,9 @@
         "@bazel_tools//tools/bash/runfiles",
     ],
 )
+
+# This export allows targets in other packages to reference files that live
+# in this package.
+exports_files([
+    "tsconfig.json",
+])