# gulp-inline-source

> Inline flagged js & css sources.

Latest version **4.0.0** (published 2018-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-inline-source
pnpm add gulp-inline-source
yarn add gulp-inline-source
bun add gulp-inline-source
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2018-11-21 |
| First published | 2014-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 3 |
| Unpacked size | 10.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 208 |
| Author | Filip Malinowski |
| Maintainers | fmal |
| Keywords | gulpplugin, inline, css, javascript |

## Links

- npm: https://www.npmjs.com/package/gulp-inline-source
- Repository: https://github.com/fmal/gulp-inline-source
- Homepage: https://github.com/fmal/gulp-inline-source#readme
- Issues: https://github.com/fmal/gulp-inline-source/issues
- npm.io page: https://npm.io/package/gulp-inline-source

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) ~2.0.0
- [plugin-error](https://npm.io/package/plugin-error.md) ~1.0.1
- [inline-source](https://npm.io/package/inline-source.md) ~6.1.8

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2018-11-21
- 3.2.0 — 2018-06-21
- 3.1.0 — 2017-04-09
- 3.0.0 — 2016-08-12
- 2.1.0 — 2015-07-26
- 2.0.0 — 2015-06-14
- 1.3.0 — 2015-04-28
- 1.2.0 — 2015-02-10
- 1.1.0 — 2014-11-05
- 1.0.1 — 2014-11-05
- 1.0.0 — 2014-10-21
- 0.0.3 — 2014-09-09
- 0.0.2 — 2014-04-15
- 0.0.1 — 2014-03-08

## README

# gulp-inline-source

[![NPM Version](https://img.shields.io/npm/v/gulp-inline-source.svg?style=flat-square)](https://www.npmjs.com/package/gulp-inline-source)
[![Build Status](https://img.shields.io/travis/fmal/gulp-inline-source/master.svg?style=flat-square)](http://travis-ci.org/fmal/gulp-inline-source) 
[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)

> Inline all `<script>`, `<link>` and `<img>` tags that contain the `inline` attribute with [inline-source](https://github.com/popeindustries/inline-source).

## How it works

```html
<!-- located at src/html/index.html -->
<html>
  <head>
    <!-- inline src/js/inlineScript.js -->
    <script src="../js/inlineScript.js" inline></script>
  </head>
  <body>
  </body>
</html>
```

```js
// located at src/js/inlineScript.js

function test() {
  var foo = 'lorem ipsum';
  return foo;
}
```

Output:
```html
<html>
  <head>
    <script>function test(){var a="lorem ipsum";return a}</script>
  </head>
  <body>
  </body>
</html>
```

## Install

```bash
$ npm install gulp-inline-source --save-dev
```

## Usage

```javascript
var gulp = require('gulp');
var inlinesource = require('gulp-inline-source');

gulp.task('inlinesource', function () {
    return gulp.src('./src/*.html')
        .pipe(inlinesource())
        .pipe(gulp.dest('./out'));
});
```

Optionally, you can provide [some options](https://github.com/popeindustries/inline-source#usage) through an options object:

```javascript
var gulp = require('gulp');
var inlinesource = require('gulp-inline-source');

gulp.task('inlinesource', function () {
    var options = {
        compress: false
    };

    return gulp.src('./src/*.html')
        .pipe(inlinesource(options))
        .pipe(gulp.dest('./out'));
});
```

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