Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.43 KB

README.md

File metadata and controls

65 lines (50 loc) · 1.43 KB

gulp-processjade

Gulp plugin to process/transform jade files. This is based on similar lines as Adam Timberlake's gulp-processhtml

License MIT

  • npm: npm install gulp-processjade --save-dev

Gulpfile

var gulp = require('gulp'),
    processjade = require('gulp-processjade')
    opts = { /* plugin options */ };

gulp.task('default', function () {
    return gulp.src('./*.jade')
               .pipe(processjade(opts))
               .pipe(gulp.dest('dist'));
});

Example Usage

You might need to change some attributes in your jade, when you're releasing for a different environment.

Using this plugin, you can transform this:

doctype html
html
  head
    // build:css style.min.css
    link(rel='stylesheet', href='css/style.css')
    // /build
  body
    // build:js app.min.js
    script(src='app.js')
    // /build
    // build:remove
    script(src='http://192.168.0.1:35729/livereload.js?snipver=1')
    // /build
    // build:replace 'Goodbye Livereload...'
    script(src='http://192.168.0.1:35729/livereload.js?snipver=1')
    // /build

To this:

doctype html
html
  head
    link(rel='stylesheet', href='style.min.css')
  body
    script(src='app.min.js')
    | Goodbye Livereload...

Credits

Denis Ciccale Adam Timberlake