@akzhan/gulp-juice

0.1.6 • Public • Published

gulp-juice

build status

Stream html files through juice to inline CSS.

Examples

var juice = require('gulp-juice');

gulp.task('bootloader', function(){
  gulp.src('./.build/bootloader.html')
    .pipe(juice({}))
    .pipe(gulp.dest('./.build/bootloader.inline.html'));
});

gulp.task('deploy', ['build', 'manifest', 'bootloader', 'publishtoS3']);

Protip when using with a template renderer: need to pipe to dest first as you probably want juice resolving css relative to our actual build output:

var juice = require('gulp-juice'),
  jade = require('gulp-jade');

gulp.task('bootloader', function(){
  gulp.src('./app/templates/bootloader.jade')
    .pipe(jade({pretty: true}))
    .pipe(gulp.dest('./.build'))
    .pipe(juice())
    .pipe(gulp.dest('./.build'));
});

gulp.task('deploy', ['build', 'manifest', 'bootloader', 'publishtoS3']);

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.6
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.6
    17
  • 0.1.5
    0
  • 0.1.4
    1

Package Sidebar

Install

npm i @akzhan/gulp-juice

Weekly Downloads

14

Version

0.1.6

License

MIT

Last publish

Collaborators

  • akzhan
  • imlucas
  • zebapy