Updated yeoman  generator to support external ng-xos-lib
Updateding Custom Views:
- ceilometerDashboard
- contentProvider
- dashboardManager
- developer
- diagnostic
- hpc
- mCordTopology
- openVPN
- serviceGrid
- subscribers
- syncNotifier
- tenant
- truckroll

Change-Id: I8bdebf70d3b72ceca8ec04565213efa60bc0b8d3
diff --git a/views/ngXosLib/generator-xos/app/templates/bower.json b/views/ngXosLib/generator-xos/app/templates/bower.json
index 0abca60..e94e145 100644
--- a/views/ngXosLib/generator-xos/app/templates/bower.json
+++ b/views/ngXosLib/generator-xos/app/templates/bower.json
@@ -5,7 +5,7 @@
     "<%= author.name %> <<%= author.email %>>"
   ],
   "description": "The <%= name %> view",
-  "license": "MIT",
+  "license": "Apache-2.0",
   "ignore": [
     "**/.*",
     "node_modules",
@@ -28,6 +28,7 @@
     "bootstrap-css": "3.3.6",
     "angular-chart.js": "~0.10.2",
     "d3": "~3.5.17",
-    "angular-recursion": "~1.0.5"
+    "angular-recursion": "~1.0.5",
+    "ng-xos-lib": "opencord/ng-xos-lib#~1.0.0"
   }
 }
diff --git a/views/ngXosLib/generator-xos/app/templates/gulp/build.js b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
index 00dc995..88d88d3 100644
--- a/views/ngXosLib/generator-xos/app/templates/gulp/build.js
+++ b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
@@ -112,7 +112,7 @@
       .pipe(
         inject(
           gulp.src([
-            options.static + 'js/vendor/xos<%= fileName %>Vendor.js',
+            options.static + 'vendor/xos<%= fileName %>Vendor.js',
             options.static + 'js/xos<%= fileName %>.js',
             options.static + 'css/xos<%= fileName %>.css'
           ]),
@@ -138,7 +138,7 @@
     return gulp.src(bowerDeps)
       .pipe(concat('xos<%= fileName %>Vendor.js'))
       .pipe(uglify())
-      .pipe(gulp.dest(options.static + 'js/vendor/'));
+      .pipe(gulp.dest(options.static + 'vendor/'));
   });
 
   gulp.task('lint', function () {
diff --git a/views/ngXosLib/generator-xos/app/templates/gulp/server.js b/views/ngXosLib/generator-xos/app/templates/gulp/server.js
index 1e40a34..36fdded 100644
--- a/views/ngXosLib/generator-xos/app/templates/gulp/server.js
+++ b/views/ngXosLib/generator-xos/app/templates/gulp/server.js
@@ -52,7 +52,6 @@
       server: {
         baseDir: options.src,
         routes: {
-          '/xos/core/xoslib/static/js/vendor': options.helpers,
           '/xos/core/static': options.static + '../../static/'
         },
         middleware: function(req, res, next){
@@ -115,7 +114,7 @@
         inject(
           gulp.src([
             options.tmp + '**/*.js',
-            options.helpers + 'ngXosHelpers.js'
+            options.helpers + 'ngXosHelpers.min.js'
           ])
           .pipe(angularFilesort()),
           {
diff --git a/views/ngXosLib/generator-xos/app/templates/gulpfile.js b/views/ngXosLib/generator-xos/app/templates/gulpfile.js
index eca4e45..c825df8 100644
--- a/views/ngXosLib/generator-xos/app/templates/gulpfile.js
+++ b/views/ngXosLib/generator-xos/app/templates/gulpfile.js
@@ -12,7 +12,7 @@
   tmp: 'src/.tmp',
   dist: 'dist/',
   api: '../../ngXosLib/api/',
-  helpers: '../../../xos/core/xoslib/static/js/vendor/',
+  helpers: './src/vendor/ng-xos-lib/dist/',
   static: '../../../xos/core/xoslib/static/', // this is the django static folder
   dashboards: '../../../xos/core/xoslib/dashboards/' // this is the django html folder
 };
diff --git a/views/ngXosLib/generator-xos/app/templates/karma.conf.js b/views/ngXosLib/generator-xos/app/templates/karma.conf.js
index 4123be9..e5abf39 100644
--- a/views/ngXosLib/generator-xos/app/templates/karma.conf.js
+++ b/views/ngXosLib/generator-xos/app/templates/karma.conf.js
@@ -26,8 +26,9 @@
 
     // list of files / patterns to load in the browser
     files: bowerComponents.concat([
-      '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
-      '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
+      './src/vendor/ng-xos-lib/dist/ngXosVendor.min.js',
+      './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
+      'src/js/main.js',
       'src/js/**/*.js',
       'spec/**/*.mock.js',
       'spec/**/*.test.js',
@@ -45,6 +46,7 @@
     preprocessors: {
       'src/js/**/*.js': ['babel'],
       'spec/**/*.test.js': ['babel'],
+      'spec/**/*.mock.js': ['babel'],
       'src/**/*.html': ['ng-html2js']
     },
 
diff --git a/views/ngXosLib/generator-xos/app/templates/package.json b/views/ngXosLib/generator-xos/app/templates/package.json
index b0f77f9..0705f5d 100644
--- a/views/ngXosLib/generator-xos/app/templates/package.json
+++ b/views/ngXosLib/generator-xos/app/templates/package.json
@@ -17,7 +17,7 @@
     "XOSlib"
   ],
   "author": "<%= author.name %>",
-  "license": "MIT",
+  "license": "Apache-2.0",
   "dependencies": {},
   "devDependencies": {
     "autoprefixer": "^6.3.3",