diff --git a/app/index.js b/app/index.js index 0805e41ce..3f9e710cf 100644 --- a/app/index.js +++ b/app/index.js @@ -353,7 +353,7 @@ Generator.prototype.packageFiles = function packageFiles() { this.template('root/_bowerrc', '.bowerrc'); this.template('root/_package.json', 'package.json'); if (this.gulp) { - this.template('root/_Gulpfile.js', 'Gulpfile.js'); + this.template('root/_gulpfile.js', 'gulpfile.js'); } else { this.template('root/_Gruntfile.js', 'Gruntfile.js'); } @@ -361,7 +361,7 @@ Generator.prototype.packageFiles = function packageFiles() { this.template('root/_tsd.json', 'tsd.json'); } this.template('root/README.md', 'README.md'); - + }; Generator.prototype._injectDependencies = function _injectDependencies() { diff --git a/templates/common/root/_Gulpfile.js b/templates/common/root/_gulpfile.js similarity index 92% rename from templates/common/root/_Gulpfile.js rename to templates/common/root/_gulpfile.js index 71858fc55..d2bb71d62 100644 --- a/templates/common/root/_Gulpfile.js +++ b/templates/common/root/_gulpfile.js @@ -48,8 +48,8 @@ var lintScripts = lazypipe()<% if (coffee) { %> .pipe($.jshint.reporter, 'jshint-stylish');<% } %> var styles = lazypipe()<% if (sass) { %> - .pipe($.rubySass, { - style: 'expanded', + .pipe($.sass, { + outputStyle: 'expanded', precision: 10 })<% } %> .pipe($.autoprefixer, 'last 1 version') @@ -102,35 +102,34 @@ gulp.task('start:server:test', function() { }); gulp.task('watch', function () { - - $.watch({glob: paths.styles}) + $.watch(paths.styles) .pipe($.plumber()) .pipe(styles()) .pipe($.connect.reload()); - $.watch({glob: paths.views.files}) + $.watch(paths.views.files) .pipe($.plumber()) .pipe($.connect.reload()); - $.watch({glob: paths.scripts}) + $.watch(paths.scripts) .pipe($.plumber()) .pipe(lintScripts())<% if (coffee) { %> .pipe($.coffee({bare: true}).on('error', $.util.log)) .pipe(gulp.dest('.tmp/scripts'))<% } %> .pipe($.connect.reload()); - $.watch({glob: paths.test}) + $.watch(paths.test) .pipe($.plumber()) .pipe(lintScripts()); gulp.watch('bower.json', ['bower']); }); -gulp.task('serve', function (callback) { +gulp.task('serve', function (cb) { runSequence('clean:tmp', ['lint:scripts'], ['start:client'], - 'watch', callback); + 'watch', cb); }); gulp.task('serve:prod', function() { @@ -164,13 +163,7 @@ gulp.task('bower', function () { // Build // /////////// -gulp.task('build', function (callback) { - runSequence('clean:dist', - ['images', 'copy:extras', 'copy:fonts', 'client:build'], - callback); -}); - -gulp.task('clean:dist', function () { +gulp.task('clean:dist', function (cb) { rimraf('./dist', cb); }); @@ -218,3 +211,9 @@ gulp.task('copy:fonts', function () { return gulp.src(yeoman.app + '/fonts/**/*') .pipe(gulp.dest(yeoman.dist + '/fonts')); }); + +gulp.task('build', ['clean:dist'], function () { + runSequence(['images', 'copy:extras', 'copy:fonts', 'client:build'); +}); + +gulp.task('default', ['build']); diff --git a/templates/common/root/_package.json b/templates/common/root/_package.json index fd016a2d1..66af33be4 100644 --- a/templates/common/root/_package.json +++ b/templates/common/root/_package.json @@ -25,7 +25,7 @@ "lazypipe": "^0.2.4", "gulp-ng-annotate": "^1.0.0", "open": "0.0.5"<% if (sass) { %>, - "gulp-ruby-sass": "^0.4.3"<% } %><% if (coffee) { %>, + "gulp-sass": "^2.0.4"<% } %><% if (coffee) { %>, "gulp-coffeelint": "^0.5.0", "gulp-coffee": "^2.3.1",<% } %><% } else { %> "autoprefixer-core": "^5.2.1",