Answer the question
In order to leave comments, you need to log in
How to make Gulp not minify html file after compiling it from jade?
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
plumber = require('gulp-plumber'),
livereload = require('gulp-livereload'),
prefix = require('gulp-autoprefixer'),
jade = require('gulp-jade'),
obfuscate = require('gulp-obfuscate'),
concatCss = require('gulp-concat-css'),
minifyCSS = require('gulp-minify-css');
// jadephp = require('gulp-jade-php');
//Scripts Task
//Uglifies
gulp.task('scripts',function(){
gulp.src('js/*.js')
.pipe(plumber())
.pipe(uglify())
.pipe(gulp.dest('output/minjs'));
});
//Styles Task
//Sass
gulp.task('sass',function(){
gulp.src('scss/**/*.scss')
.pipe(plumber())
.pipe(sass({
style: 'compressed' // is not working
}))
.pipe(prefix('last 10 versions'))
.pipe(obfuscate())
.pipe(gulp.dest('output/css/'))
.pipe(livereload());
});
//Watch Task JS,Sass,Jade
gulp.task('watch',function(){
livereload.listen();
gulp.watch('js/*.js', ['scripts']) //**.*.js
gulp.watch('scss/**/*.scss', ['sass']);
gulp.watch('jade/*.jade', ['jade']);
});
//Simple Jade task
gulp.task('jade', function() {
gulp.src('jade/*.jade')
.pipe(plumber())
.pipe(jade())
//.pipe(obfuscate())
.pipe(gulp.dest('output'))
});
gulp.task('default',['scripts','sass','jade','watch']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question