# gulp-files-inject

> A plugin for Gulp. Look for special marks in html files, and concatenate script and link tags sources to bundles

Latest version **0.0.11** (published 2017-03-18) · 0 weekly downloads

## Install

```sh
npm install gulp-files-inject
pnpm add gulp-files-inject
yarn add gulp-files-inject
bun add gulp-files-inject
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.11 |
| Published | 2017-03-18 |
| First published | 2017-03-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Victor Kaptsov |
| Maintainers | conscience |
| Keywords | gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-files-inject
- Repository: https://github.com/theconscience/gulp-files-inject
- Homepage: https://github.com/theconscience/gulp-files-inject#readme
- Issues: https://github.com/theconscience/gulp-files-inject/issues
- npm.io page: https://npm.io/package/gulp-files-inject

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) 0.6.3
- [gulp-util](https://npm.io/package/gulp-util.md) 3.0.3

## Recent versions

- 0.0.11 (latest) — 2017-03-18
- 0.0.10 — 2017-03-18
- 0.0.9 — 2017-03-18
- 0.0.8 — 2017-03-18
- 0.0.7 — 2017-03-18
- 0.0.6 — 2017-03-18
- 0.0.5 — 2017-03-18
- 0.0.4 — 2017-03-18

## README

# gulp-style-inject
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]  [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]

> style-inject plugin for [gulp](https://github.com/wearefractal/gulp)

## Usage

First, install `gulp-style-inject` as a development dependency:

```shell
npm install --save-dev gulp-style-inject
```

Then, add it to your `gulpfile.js`:

```javascript
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:

```html
    <!-- inject-style src="./path/file.css" -->
```

Example:
```html
<div>
<!-- inject-style src="./test/p.css" -->
<!-- inject-style src="./test/span.css" -->
    <p>Some text</p>
    <span>Some other text</span>
</div>
```
Output
```html
<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](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/gulp-style-inject
[npm-image]: https://badge.fury.io/js/gulp-style-inject.png

[travis-url]: http://travis-ci.org/vladfilipro/gulp-style-inject
[travis-image]: https://secure.travis-ci.org/vladfilipro/gulp-style-inject.png?branch=master

[coveralls-url]: https://coveralls.io/r/vladfilipro/gulp-style-inject
[coveralls-image]: https://coveralls.io/repos/vladfilipro/gulp-style-inject/badge.png

[depstat-url]: https://david-dm.org/vladfilipro/gulp-style-inject
[depstat-image]: https://david-dm.org/vladfilipro/gulp-style-inject.png

---
_Source: https://npm.io/package/gulp-files-inject · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
