A gulp module using Premailer to bring CSS styles inline when developing HTML emails.
npm install gulp-premailerA gulp module using Premailer to bring CSS styles inline when developing HTML emails.
gulp-premailer uses the Premailer gem to inline styles, and is required for core functionality.
You can install via RubyGems package management framework for Ruby:
```
gem install premailer
Or you can add it to your project's Gemfile and run bundle install.
Installing via npm:
``
npm install --save-dev gulp-premailer
gulp-premailer takes in piped streams and outputs the resulting HTML as a stream. This allows you to pipe the result to additional tools or the gulp.dest() function to save in a specified directory. To use gulp-premailer, specify it in a pipe within the project gulpfile:
`javascript
var gulp = require('gulp');
var premailer = require('gulp-premailer');
gulp.task('build', function () {
gulp.src('*.html')
.pipe(premailer())
.pipe(gulp.dest('builds/'));
});
`
In the example above, any files matched by the gulp.src() glob are processed by Premailer, piped to gulp.dest() and, finally, saved to builds/matched-filename.html`.