Added native Bazel build to GUI2. Reduced a lot of the unused Angular CLI structures

Reviewers should look at the changes in WORKSPACE, BUILD, BUILD.bazel, README.md files
This is only possible now as rules_nodejs went to 1.0.0 on December 20
gui2 has now been made the entry point (rather than gui2-fw-lib)
No tests or linting are functional yet for Typescript
Each NgModule now has its own BUILD.bazel file with ng_module
gui2-fw-lib is all one module and has been refactored to simplify the directory structure
gui2-topo-lib is also all one module - its directory structure has had 3 layers removed
The big bash script in web/gui2/BUILD has been removed - all is done through ng_module rules
in web/gui2/src/main/webapp/BUILD.bazel and web/gui2/src/main/webapp/app/BUILD.bazel

Change-Id: Ifcfcc23a87be39fe6d6c8324046cc8ebadb90551
diff --git a/web/gui/BUILD b/web/gui/BUILD
index 57680d9..43c2a77 100644
--- a/web/gui/BUILD
+++ b/web/gui/BUILD
@@ -48,6 +48,8 @@
     "//drivers/default:onos-drivers-default",
 ]
 
+exports_files(["src/main/webapp/data"])
+
 """
     Files that get put at the top level of the tar ball
 """
@@ -96,8 +98,7 @@
 genrule(
     name = "_onos-gui-npm-install",
     srcs = [
-        "@nodejs//:bin/npm",
-        "@nodejs//:bin/nodejs/bin/node",
+        "@nodejs//:npm",
         "@gui1_npm//:node_modules",
         "//tools/gui:tools-gui-gulp",
     ],
@@ -110,7 +111,7 @@
           " export XDG_CONFIG_HOME=$(@D)/config &&" +  # npm config cache to the sandbos
           " export BABEL_DISABLE_CACHE=1 &&" +  # turn off babel cache
           ' if [[ ! -z $${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $$HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi &&' +
-          " NPM=$$ROOT/$(location @nodejs//:bin/npm) &&" +
+          " NPM=$$ROOT/$(location @nodejs//:npm) &&" +
           " mkdir -p tools/gui &&" +
           " cd tools/gui &&" +
           " jar xf ../../$(location //tools/gui:tools-gui-gulp) &&" +
@@ -129,8 +130,6 @@
     name = "_onos-gui-npm-build",
     srcs = [
         "@nodejs//:npm",
-        "@nodejs//:bin/npm",
-        "@nodejs//:bin/nodejs/bin/node",
         ":_onos-gui-npm-install",
         ":_web_app_all",
     ],
@@ -144,7 +143,7 @@
           " export BABEL_DISABLE_CACHE=1 &&" +
           " INSTALL_FILES=($(locations :_onos-gui-npm-install)) &&" +  # An array of filenames - sorted by time created
           ' if [[ ! -z $${HTTP_PROXY-} ]]; then NPM_ARGS="--proxy $$HTTP_PROXY --without-ssl --insecure"; else NPM_ARGS=""; fi &&' +
-          " NPM=$(location @nodejs//:bin/npm) &&" +
+          " NPM=$(location @nodejs//:npm) &&" +
           " (mkdir -p web/gui && cd web/gui && jar xf ../../$(location :_web_app_all)) &&" +
           " mkdir -p tools/gui && cd tools/gui &&" +
           " jar xf $$ROOT/$${INSTALL_FILES[0]} &&" +
@@ -235,16 +234,6 @@
     visibility = ["//visibility:public"],
 )
 
-genrule(
-    name = "onos-gui-data-for-gui2",
-    srcs = glob([
-        "src/main/webapp/data/**/*",
-    ]),
-    outs = ["onos-gui-data-for-gui2.srcjar"],
-    cmd = "jar cf $@ $(SRCS)",
-    visibility = ["//visibility:public"],
-)
-
 """
     Builds the tar ball for the ONOS GUI
 """