gp

gulp-premailer

Premailer for gulp

Showing:

Popularity

Downloads/wk

95

GitHub Stars

53

Maintenance

Last Commit

7yrs ago

Contributors

2

Package

Dependencies

4

Size (min+gzip)

15.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-premailer

A gulp module using Premailer to bring CSS styles inline when developing HTML emails.

Prerequisites

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.

Installation

Installing via npm:

npm install --save-dev gulp-premailer

Usage and Example

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:

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.

Contributing

As said previously, this is a learning project based on need for other projects and desire to experiment with node. I welcome all insight, discussion and code suggestions.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial