Skip to content Skip to sidebar Skip to footer

Gulp-browserify Error During Compilation Of Jade In Html

Sorry for possible mistakes in the writing - use the Google translator. I use the gulp-browserify gulpfile.js - gulp.task('jade', function(){ gulp.src('app/src/*.jade') .p

Solution 1:

Looks like this is an issue with gulp-browserify and jadeify.

You can wait until those are resolved upstream, or just use browserify directly:

// ... require other gulp related modulesvar browserify = require('browserify');
// allow browserify to play nicely with gulp's streams// more info: https://www.npmjs.org/package/vinyl-source-streamvar source = require('vinyl-source-stream');

gulp.task('jade', function() {
  // unfortunately, you do miss out on// globbing with this methodbrowserify(['./app/src/index.jade'])
  .transform(require('jadeify'))
  .bundle()
  .pipe(source('index.html'))
  .pipe(gulp.dest('app/dev'));
});

Another note note, you have an error in index.jade:

head
    meta(charset="UTF-8")
        title Test

Should be:

head
    meta(charset="UTF-8")
    title Test

(meta should not have any child elements.)

Post a Comment for "Gulp-browserify Error During Compilation Of Jade In Html"