# webpack-config-stream

> Helps to build bundles based on webpack configs

Latest version **4.0.0** (published 2015-12-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install webpack-config-stream
pnpm add webpack-config-stream
yarn add webpack-config-stream
bun add webpack-config-stream
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2015-12-11 |
| First published | 2015-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Marat Dreizin |
| Maintainers | mdreizin |
| Keywords | webpack, webpack config, gulp, gulp webpack, gulp webpack config |

## Links

- npm: https://www.npmjs.com/package/webpack-config-stream
- Repository: https://github.com/mdreizin/webpack-config-stream
- Issues: https://github.com/mdreizin/webpack-config-stream/issues
- npm.io page: https://npm.io/package/webpack-config-stream

## Dependencies (12)

- [glob](https://npm.io/package/glob.md) ^6.0.1
- [lodash](https://npm.io/package/lodash.md) ^3.10.0
- [tildify](https://npm.io/package/tildify.md) ^1.0.0
- [webpack](https://npm.io/package/webpack.md) ^1.12.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.0.6
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.26.2
- [progress](https://npm.io/package/progress.md) ^1.1.8
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.4
- [memory-fs](https://npm.io/package/memory-fs.md) ^0.3.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.0
- [webpack-config](https://npm.io/package/webpack-config.md) ^3.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2015-12-11
- 3.0.0 — 2015-12-07
- 2.3.0 — 2015-11-20
- 2.2.0 — 2015-11-20
- 2.1.0 — 2015-11-20
- 2.0.0 — 2015-11-19
- 1.3.0 — 2015-11-18
- 1.2.1 — 2015-11-10
- 1.2.0 — 2015-11-10
- 1.1.0 — 2015-11-10
- 1.0.1 — 2015-10-23
- 1.0.0 — 2015-10-20

## README

[![NPM version](http://img.shields.io/npm/v/webpack-config-stream.svg?style=flat)](https://www.npmjs.org/package/webpack-config-stream) [![Travis build status](http://img.shields.io/travis/mdreizin/webpack-config-stream/master.svg?style=flat)](https://travis-ci.org/mdreizin/webpack-config-stream) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/mdreizin/webpack-config-stream?svg=true&branch=master)](https://ci.appveyor.com/project/mdreizin/webpack-config-stream) [![Code Climate](https://codeclimate.com/github/mdreizin/webpack-config-stream/badges/gpa.svg)](https://codeclimate.com/github/mdreizin/webpack-config-stream) [![Code Climate](https://codeclimate.com/github/mdreizin/webpack-config-stream/badges/coverage.svg)](https://codeclimate.com/github/mdreizin/webpack-config-stream) [![Dependency Status](https://david-dm.org/mdreizin/webpack-config-stream.svg?style=flat)](https://david-dm.org/mdreizin/webpack-config-stream) [![Dependency Status](https://david-dm.org/mdreizin/webpack-config-stream/dev-status.svg?style=flat)](https://david-dm.org/mdreizin/webpack-config-stream#info=devDependencies)

[webpack](https://github.com/webpack/webpack)-[config](https://github.com/mdreizin/webpack-config)-stream
=========================================================================================================

Helps to build bundles based on webpack configs

<h2 id="documentation">Documentation</h2>

For API docs please see the [documentation page](https://github.com/mdreizin/webpack-config-stream/blob/master/docs/API.md)!

<h2 id="sample">Sample</h2>

Here is a quick sample of what `webpack-config-stream` does:

`gulpfile.js`

``` javascript
'use strict';

var path = require('path'),
    gulp = require('gulp'),
    webpack = require('webpack-config-stream'),
    DefaultCacheStrategy = require('webpack-config-stream/lib/defaultCacheStrategy');

var src = './src',
    dest = './dist',
    configOptions = {
        debug: true,
        devtool: '#source-map',
        watchDelay: 200
    },
    compilerOptions = {
        useMemoryFs: true,
        progress: true
    },
    CONFIG_FILENAME = webpack.Config.FILENAME,
    CACHE_DEPENDS_ON = [
        './package.json'
    ],
    RUN_CACHE_STRATEGY = new DefaultCacheStrategy({
        dependsOn: [
            '[dirname]/**/*.*'
        ].concat(CACHE_DEPENDS_ON)
    }),
    WATCH_CACHE_STRATEGY = new DefaultCacheStrategy({
        dependsOn: [
            '[filename]'
        ].concat(CACHE_DEPENDS_ON)
    });

gulp.task('webpack', [], function() {
    return gulp.src(path.join(src, '**', CONFIG_FILENAME), { base: path.resolve(src) })
        .pipe(webpack.cache(RUN_CACHE_STRATEGY))
        .pipe(webpack.init(compilerOptions))
        .pipe(webpack.props(configOptions))
        .pipe(webpack.run())
        .pipe(webpack.format({
            version: false,
            timings: true
        }))
        .pipe(webpack.failAfter({
            errors: true,
            warnings: true
        }))
        .pipe(webpack.ignore())
        .pipe(gulp.dest(dest));
});

gulp.task('watch', function() {
    gulp.watch(path.join(src, '**/*.*')).on('change', function(event) {
        if (event.type === 'changed') {
            gulp.src(event.path, { base: path.resolve(src) })
                .pipe(webpack.closest())
                .pipe(webpack.cache(WATCH_CACHE_STRATEGY))
                .pipe(webpack.init(compilerOptions))
                .pipe(webpack.props(configOptions))
                .pipe(webpack.watch(function(err, stats) {
                    gulp.src(this.path, { base: this.base })
                        .pipe(webpack.proxy(err, stats))
                        .pipe(webpack.format({
                            verbose: true,
                            version: false
                        }))
                        .pipe(webpack.ignore())
                        .pipe(gulp.dest(dest));
                }));
        }
    });
});

```

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