0.4.0 • Published 10 years ago

gulp-premailer v0.4.0

Weekly downloads
417
License
MIT
Repository
github
Last release
10 years ago

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.

0.4.0

10 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago