1.1.1 • Published 9 years ago

gulp-inline_css v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

How It Works

This gulp plugin takes an html file and inlines the CSS into the html.

file.html:

<html>
<head> 
  <link rel="stylesheet" href="//xxx.com/style.css?__inline">
</head>
<body>
  <p>Test</p>
</body>
</html>

link must with the flag '?__inline'.

//xxx.com/style.css:

p {
  color: red;
}

Output:

<html>
<head>
</head>
<style type="text/css">
    p {
  color: red;
}
</style>
<body>
  <p>Test</p>
</body>
</html>

Install

npm install --save-dev gulp-inline_css

Usage

var gulp = require('gulp'),
inlineCss = require('gulp-inline_css');

gulp.task('default', function() {
    return gulp.src('./**/*.html')
        .pipe(inlineCss())
        .pipe(gulp.dest('build/'));
});
1.1.1

9 years ago

1.1.0

9 years ago

1.0.10

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago