1.1.1 • Published 8 years ago

gulp-inline_css v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 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

8 years ago

1.1.0

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago