M
M
Mikhail Rudenko2015-03-24 00:26:02
HTML
Mikhail Rudenko, 2015-03-24 00:26:02

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']);

This is Gulpfile.js written by me, how to make sure that when compiling from jade, the html source is not minified, which lines need to be added, which plugin to download?) Waiting for your answers)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Mischuk, 2015-03-24
@balion

.pipe(jade({pretty: true}))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question