Gulp plugin for inject css file to html
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test 💎 Release 1.0.0 Jun 9, 2018
.gitignore 🎉 Initial commit Aug 21, 2017
.travis.yml Cache dependencies in Travis CI Dec 31, 2018
LICENSE Add LICENSE Aug 8, 2018
README.md 💎 Release 1.0.0 Jun 9, 2018
index.js 💎 Release 1.0.0 Jun 9, 2018
package-lock.json 2.0.0 Nov 21, 2018
package.json 2.0.0 Nov 21, 2018

README.md

gulp-inject-css

Travis Dependency Status devDependency Status

Inject css file to html

Install

npm install gulp-inject-css --save-dev

Usage

const gulp = require('gulp');
const injectCSS = require('gulp-inject-css');

gulp.task('inject-css', function() {
  gulp.src('src/*.html')
    .pipe(injectCSS())
    .pipe(gulp.dest('dist'));
});

In the html file, specify the relative path to css

<html>
  ...
  <!-- inject-css css/main.css -->
  ...
</html>