0.0.11 • Published 7 years ago

gulp-files-inject v0.0.11

Weekly downloads
1
License
-
Repository
github
Last release
7 years ago

gulp-style-inject

NPM version Build Status Coverage Status Dependency Status

style-inject plugin for gulp

Usage

First, install gulp-style-inject as a development dependency:

npm install --save-dev gulp-style-inject

Then, add it to your gulpfile.js:

var styleInject = require("gulp-style-inject");

gulp.src("./src/*.html")
	.pipe(styleInject())
	.pipe(gulp.dest("./dist"));

All your html files should include the following tag:

    <!-- inject-style src="./path/file.css" -->

Example:

<div>
<!-- inject-style src="./test/p.css" -->
<!-- inject-style src="./test/span.css" -->
    <p>Some text</p>
    <span>Some other text</span>
</div>

Output

<div>
<style>
p {
    background-color: red;
}
</style>
<style>
span {
    background-color: green;
}
</style>
    <p>Some text</p>
    <span>Some other text</span>
</div>

License

MIT License

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago