Skip to content

Commit

Permalink
css + html minification, removed css sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdbnntt committed Jan 26, 2017
1 parent 092bc10 commit d879c4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,17 @@ function getViewFiles(directory, extension) {
gulp.task('css', function() {
var sass = require('gulp-sass');
var autoPrefixer = require('gulp-autoprefixer');
var sourceMaps = require('gulp-sourcemaps');
var cleanCss = require('gulp-clean-css');

return gulp.src(getViewFiles(dirs.src, 'scss'))
.pipe(sourceMaps.init())
.pipe(sass.sync({
outputStyle: 'compact',
}).on('error', sass.logError))

.pipe(autoPrefixer({
cascade: false
}))
.pipe(sourceMaps.write('./',{
addComment: true,
includeContent: true
}))
.pipe(cleanCss())
.pipe(gulp.dest(dirs.build));
});
gulp.task('css:watch', ['css'], function() {
Expand All @@ -81,7 +78,7 @@ gulp.task('html', function() {

return gulp.src(getViewFiles(dirs.viewSrc, 'pug'))
.pipe(pug({
pretty: true,
pretty: false,
locals: locals
}))
.pipe(gulp.dest(dirs.viewDst));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.1",
"gulp-bower": "0.0.13",
"gulp-clean-css": "^2.3.2",
"gulp-header": "^1.8.8",
"gulp-pug": "^3.1.0",
"gulp-sass": "^2.3.2",
Expand Down

0 comments on commit d879c4b

Please sign in to comment.