BUCK GUI: Excluded generated javascript files from genrule
Removed the NPM Lock file that generated.
Change-Id: Ia2d16f28a3a11056f8eaed2805684020b9d2c4eb
diff --git a/tools/gui/gulp-tasks/bundles/bundle-js/index.js b/tools/gui/gulp-tasks/bundles/bundle-js/index.js
index aff58b6..e994d30 100644
--- a/tools/gui/gulp-tasks/bundles/bundle-js/index.js
+++ b/tools/gui/gulp-tasks/bundles/bundle-js/index.js
@@ -4,7 +4,7 @@
import uglyfy from 'gulp-uglify';
import sourceMaps from 'gulp-sourcemaps';
import BundleResources from '../helpers/bundleResources';
-// import { reload } from '../../dev-server';
+import { reload } from '../../dev-server';
const GUI_BASE = '../../web/gui/src/main/webapp/';
const bundleFiles = [
@@ -43,7 +43,7 @@
.pipe(concat(exportName))
.pipe(sourceMaps.write('source-map'))
.pipe(gulp.dest(GUI_BASE + '/dist/'))
- .on('end', () => { /* reload(); */ })
+ .on('end', () => { reload(); })
}
return gulp.src(BundleResources(GUI_BASE, files))
diff --git a/tools/gui/gulp-tasks/index.js b/tools/gui/gulp-tasks/index.js
index 3a31432..1a926f6 100644
--- a/tools/gui/gulp-tasks/index.js
+++ b/tools/gui/gulp-tasks/index.js
@@ -2,6 +2,6 @@
export { default as BundleCSS } from './bundles/bundle-css';
// TODO: These are commented out because of npm issues with BUCK.
-// export { default as Lint } from './lint';
-// export { default as DevServer } from './dev-server';
-// export { default as Tests } from './unit-tests';
\ No newline at end of file
+export { default as Lint } from './lint';
+export { default as DevServer } from './dev-server';
+export { default as Tests } from './unit-tests';
\ No newline at end of file
diff --git a/web/gui/BUCK b/web/gui/BUCK
index e15ce91..cacd7b7 100644
--- a/web/gui/BUCK
+++ b/web/gui/BUCK
@@ -46,11 +46,10 @@
genrule(
name = 'onos-tools-gui',
- srcs = ['src/main/webapp'],
+ srcs = glob(['src/main/webapp/**/*.js'], excludes = ['src/main/webapp/dist/*.js']),
bash = '$(location :onos-tools-gui-exe) '
+ '$(location //web/gui:node-release-v8.1.2) '
+ '$(location //web/gui:node-bin-v8.1.2) > $OUT',
- cmd_exe = '',
out = 'onos-tools-gui.log',
visibility = [ 'PUBLIC' ],
)
diff --git a/web/gui/onos-gui-build b/web/gui/onos-gui-build
index 98b5623..b0bb79f 100755
--- a/web/gui/onos-gui-build
+++ b/web/gui/onos-gui-build
@@ -1,4 +1,5 @@
#!/bin/bash
+set -e
ONOS_INSTALL_LOCATION=$2
echo ${ONOS_INSTALL_LOCATION}
@@ -8,9 +9,13 @@
cd $ONOS_ROOT/tools/gui
+# Ensure lock file is removed
+rm -f package-lock.json
+
# Install Project Dependencies
echo "Installing project dependencies"
npm install --loglevel=error
+rm -f package-lock.json
# Build the GUI Project
echo "Packaging JavaScript and CSS"
diff --git a/web/gui/src/main/webapp/onos.js b/web/gui/src/main/webapp/onos.js
index a71a04e..844fd46 100644
--- a/web/gui/src/main/webapp/onos.js
+++ b/web/gui/src/main/webapp/onos.js
@@ -17,6 +17,7 @@
/*
ONOS GUI -- Main Application Module
*/
+
(function () {
'use strict';