Update gulfile : uses main-bower-files to concatenate main js of each library.
authorrougeronj
Fri, 17 Apr 2015 11:26:26 +0200
changeset 158 c7e0e3212b4c
parent 157 8d9236956d65
child 159 f2e4641681f6
Update gulfile : uses main-bower-files to concatenate main js of each library. Add it to dev dependencies.
client/annot-client/gulpfile.js
client/annot-client/package.json
--- a/client/annot-client/gulpfile.js	Thu Apr 16 14:25:23 2015 +0200
+++ b/client/annot-client/gulpfile.js	Fri Apr 17 11:26:26 2015 +0200
@@ -2,6 +2,7 @@
 var del = require('del');
 var gutil = require('gulp-util')
 var plugins = require("gulp-load-plugins")({lazy:false});
+var mainBowerFiles = require('main-bower-files');
 
 var templateFolder = '../../annot-server/webapp/templates/';
 var staticFolder = '../../annot-server/static';
@@ -63,7 +64,7 @@
 
 gulp.task('vendorJS', function(){
     //concatenate vendor JS files
-    gulp.src(vendorJSsrc)
+	return gulp.src(mainBowerFiles())
         .pipe(plugins.concat('lib.js'))
         .pipe(gulp.dest(staticFolder+'/js'))
         .pipe(plugins.filesize())
--- a/client/annot-client/package.json	Thu Apr 16 14:25:23 2015 +0200
+++ b/client/annot-client/package.json	Fri Apr 17 11:26:26 2015 +0200
@@ -28,6 +28,7 @@
     "gulp-webserver": "^0.8.3",
     "karma": "^0.12.23",
     "karma-chrome-launcher": "^0.1.4",
-    "karma-jasmine": "^0.1.5"
+    "karma-jasmine": "^0.1.5",
+    "main-bower-files": "^2.6.2"
   }
 }