|
|
@@ -23,8 +23,8 @@ var gulp = require("gulp"),
|
|
|
|
|
|
|
|
|
gulp
|
|
|
-.task("pre", function() {
|
|
|
- gulp.src(["src/web/**/*.html", "!src/web/index.html", "!src/web/bower_components/**/*"])
|
|
|
+.task("angular", function() {
|
|
|
+ return gulp.src(["src/web/**/*.html", "!src/web/index.html", "!src/web/bower_components/**/*"])
|
|
|
.pipe(plumber(errLogger))
|
|
|
.pipe(minifyHtml())
|
|
|
.pipe(ngHtml2Js({
|
|
|
@@ -35,9 +35,11 @@ gulp
|
|
|
return "modellang-ide." + (prefix === "pages" ? "" : prefix + ".") + moduleName;
|
|
|
}
|
|
|
}))
|
|
|
- .pipe(concat("templates.min.js"))
|
|
|
+ .pipe(concat("templates.js"))
|
|
|
.pipe(gulp.dest(opts.buildDir + "/web"));
|
|
|
+})
|
|
|
|
|
|
+.task("assets", function() {
|
|
|
return gulp.src("src/web/assets/**/*")
|
|
|
.pipe(plumber(errLogger))
|
|
|
.pipe(babel())
|
|
|
@@ -49,7 +51,7 @@ gulp
|
|
|
return bower();
|
|
|
})
|
|
|
|
|
|
-.task("concat", ["pre", "bower"], function() {
|
|
|
+.task("concat", ["angular", "assets", "bower"], function() {
|
|
|
var assets = useref.assets();
|
|
|
|
|
|
return gulp.src("src/web/index.html")
|
|
|
@@ -90,7 +92,7 @@ gulp
|
|
|
})
|
|
|
|
|
|
.task("build", ["concat", "parser", "generator"], function() {
|
|
|
- return gulp.src(opts.buildDir + "/web/{index,templates}.min.js")
|
|
|
+ return gulp.src(opts.buildDir + "/web/{index.min,templates}.js")
|
|
|
.pipe(plumber(errLogger))
|
|
|
.pipe(concat("index.min.js"))
|
|
|
.pipe(ngAnnotate())
|
|
|
@@ -101,7 +103,7 @@ gulp
|
|
|
.task("deploy", ["build"], function() {
|
|
|
return gulp.src(opts.buildDir + "/web/**/*")
|
|
|
.pipe(deploy({
|
|
|
- push: gutil.env.nopush ? false : true,
|
|
|
+ push: !gutil.env.nopush,
|
|
|
}));
|
|
|
})
|
|
|
;
|