Skip to content

Process jade files at build time to modify them depending on the release environment

License

Notifications You must be signed in to change notification settings

meanhub/gulp-processjade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Process jade files at build time to modify them depending on the release environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published