# fusebox-gulp-plugin

> Adapt gulp plugins to work with fuse-box

Latest version **1.0.4** (published 2017-02-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install fusebox-gulp-plugin
pnpm add fusebox-gulp-plugin
yarn add fusebox-gulp-plugin
bun add fusebox-gulp-plugin
```

## 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 | 1.0.4 |
| Published | 2017-02-17 |
| First published | 2016-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | iamthes |
| Keywords | gulp, fuse-box |

## Links

- npm: https://www.npmjs.com/package/fusebox-gulp-plugin
- Repository: https://github.com/unlight/fusebox-gulp-plugin
- Homepage: https://github.com/unlight/fusebox-gulp-plugin#readme
- Issues: https://github.com/unlight/fusebox-gulp-plugin/issues
- npm.io page: https://npm.io/package/fusebox-gulp-plugin

## Dependencies (3)

- [vinyl](https://npm.io/package/vinyl.md) 2.0.1
- [pumpify](https://npm.io/package/pumpify.md) 1.3.5
- [stream-to-string](https://npm.io/package/stream-to-string.md) 1.1.0

## Recent versions

- 1.0.4 (latest) — 2017-02-17
- 1.0.3 — 2017-02-14
- 1.0.2 — 2017-02-14
- 1.0.1 — 2017-01-11
- 1.0.0 — 2017-01-05
- 0.1.0 — 2016-12-30
- 0.0.1 — 2016-12-29

## README

fusebox-gulp-plugin
===================
Adapt gulp plugins to work with fuse-box.

## Usage
```js
const fsbx = require('fuse-box');
const g = require('gulp-load-plugins')();
const { GulpPlugin } = require('fusebox-gulp-plugin');

const fuseBox = fsbx.FuseBox.init({
    homeDir: 'src/',
    outFile: './build/app.js',
    plugins: [
        // Other fusebox plugins...
        GulpPlugin([
        	(file) => g.replace('foo', 'bar'),
        	// Other gulp plugins...
        ])
    ]
});
```

**Note:**
GulpPlugin is applicable to all files, so you must control type of transform by `ChainPlugin`
(see examples below).

Also, you can use only those plugins which only manipulates `contents` property of vinyl file.  
Applying of some plugins, like `gulp-rename`, does not make sense,
because they do not affect `contents`, but others - path, dirname, etc.


### API
```js
function GulpPlugin(streamFactories: ((file: File) => stream.Transform)[])
```

### Examples

```js
const { GulpPlugin } = require('fusebox-gulp-plugin');
const g = require('gulp-load-plugins')();
```

#### Markdown
```js
const plugins = [
    [
        /\.md$/,
        GulpPlugin([
            () => g.markdown(),
        ]),
        RawPlugin({ extensions: ['.md'] }),
    ]
];
```
```js
var doc = require('./doc.md')
```

#### JSON5
```js
const plugins = [
    {
        init: (k) => k.allowExtension('.json5')
    },
    [
        /\.json5$/,
        GulpPlugin([
            () => g.json5(),
        ]),
        JSONPlugin({}),
    ]
];
```
```js
const data = require('./data.json5');
```

### DEBUG
```
inspect node_modules/ava/profile.js lib/index.spec.js
```

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