|
|
@@ -18,10 +18,10 @@ var paths = {
|
|
|
frontend: {
|
|
|
scripts: [
|
|
|
'../common/*.js',
|
|
|
- 'src/js/**/*.js'
|
|
|
+ 'src/js/**/*.js'
|
|
|
],
|
|
|
- styles: [
|
|
|
- 'temp/css/*'
|
|
|
+ styles: [
|
|
|
+ 'temp/css/*'
|
|
|
],
|
|
|
less: [
|
|
|
// '../common/*.less',
|
|
|
@@ -39,7 +39,7 @@ var paths = {
|
|
|
var distpath = '../dist/userview';
|
|
|
|
|
|
gulp.task('app-css', function() {
|
|
|
- del([distpath + '/app-*.css'],{cwd:process.cwd(),force:true});
|
|
|
+ del([distpath + '/app-*.css'], { cwd: process.cwd(), force: true });
|
|
|
return gulp.src(paths.frontend.less)
|
|
|
.pipe(less())
|
|
|
.pipe(concat('app.css'))
|
|
|
@@ -50,7 +50,7 @@ gulp.task('app-css', function() {
|
|
|
.pipe(gulp.dest('temp/manifest'));
|
|
|
});
|
|
|
|
|
|
-gulp.task('rev', ['app-css','js'], function() {
|
|
|
+gulp.task('rev', ['app-css', 'js'], function() {
|
|
|
return gulp.src(['temp/manifest/*.json', 'src/html/index.html'])
|
|
|
.pipe(revCollector())
|
|
|
.pipe(gulp.dest(distpath));
|
|
|
@@ -58,14 +58,14 @@ gulp.task('rev', ['app-css','js'], function() {
|
|
|
|
|
|
gulp.task('template', function() {
|
|
|
return gulp.src(paths.frontend.template)
|
|
|
- .pipe(templateCache('templates.js', { module:'templatescache', standalone:true, root: 'templates/' }))
|
|
|
+ .pipe(templateCache('templates.js', { module: 'templatescache', standalone: true, root: 'templates/' }))
|
|
|
.pipe(gulp.dest('src/js'));
|
|
|
});
|
|
|
|
|
|
gulp.task('js', ['template'], function() {
|
|
|
// Cleanup old assets
|
|
|
- del([distpath + '/app-*.js'], {cwd:process.cwd(),force:true});
|
|
|
-
|
|
|
+ del([distpath + '/app-*.js'], { cwd: process.cwd(), force: true });
|
|
|
+
|
|
|
return gulp.src(paths.frontend.scripts)
|
|
|
.pipe(concat('app.js'))
|
|
|
.pipe(minifyjs())
|
|
|
@@ -87,7 +87,7 @@ gulp.task('js', ['template'], function() {
|
|
|
|
|
|
gulp.task('build', ['app-css', 'template', 'js', 'rev']);
|
|
|
|
|
|
-gulp.task('watch', function(){
|
|
|
+gulp.task('watch', function() {
|
|
|
gulp.watch('src/less/*.less', ['app-css', 'rev']);
|
|
|
gulp.watch('src/html/**/*.html', ['rev']);
|
|
|
gulp.watch('src/templates/**/*.html', ['template', 'js', 'rev']);
|