Skip to content

Commit

Permalink
Remove templating duplication in the styles task
Browse files Browse the repository at this point in the history
  • Loading branch information
silvenon committed Apr 13, 2014
1 parent 3c6aeb9 commit d1d98a1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@ var gulp = require('gulp');
// load plugins
var $ = require('gulp-load-plugins')();

<% if (includeSass) { %>
gulp.task('styles', function () {
gulp.task('styles', function () {<% if (includeSass) { %>
return gulp.src('app/styles/main.scss')
.pipe($.rubySass({
style: 'expanded'
}))
.pipe($.autoprefixer('last 1 version'))
.pipe(gulp.dest('app/styles'))
.pipe($.size());
});
<% } else { %>
gulp.task('styles', function () {
return gulp.src('app/styles/main.css')
}))<% } else { %>
return gulp.src('app/styles/main.css')<% } %>
.pipe($.autoprefixer('last 1 version'))
.pipe(gulp.dest('app/styles'))
.pipe($.size());
});
<% } %>

gulp.task('scripts', function () {
return gulp.src('app/scripts/**/*.js')
.pipe($.jshint())
Expand Down

0 comments on commit d1d98a1

Please sign in to comment.