node-webpack-stream-7.0.0/0000775000175000017500000000000014113320500014353 5ustar emfoxemfoxnode-webpack-stream-7.0.0/test/0000775000175000017500000000000014113320500015332 5ustar emfoxemfoxnode-webpack-stream-7.0.0/test/test.js0000664000175000017500000001302614113320500016651 0ustar emfoxemfoxconst test = require('tape'); const webpack = require('../'); const path = require('path'); const fs = require('vinyl-fs'); const named = require('vinyl-named'); const base = path.resolve(__dirname, 'fixtures'); test('streams output assets', function (t) { t.plan(3); const entry = fs.src('test/fixtures/entry.js'); const stream = webpack({ config: { mode: 'development', output: { filename: 'bundle.js' } }, quiet: true }); stream.on('data', function (file) { const basename = path.basename(file.path); const contents = file.contents.toString(); switch (basename) { case 'bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); break; case 'test_fixtures_chunk_js.bundle.js': t.ok(/var chunk = true;/i.test(contents), 'should contain "var chunk = true;"'); break; } }); entry.pipe(stream); }); test('multiple entry points', function (t) { t.plan(3); const stream = webpack({ config: { mode: 'development', entry: { one: path.join(base, 'entry.js'), two: path.join(base, 'anotherentrypoint.js') }, output: { filename: '[name].bundle.js' } }, quiet: true }); stream.on('data', function (file) { const basename = path.basename(file.path); const contents = file.contents.toString(); switch (basename) { case 'one.bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); break; case 'two.bundle.js': t.ok(/var anotherentrypoint = true;/i.test(contents), 'should contain "var anotherentrypoint = true;"'); break; } }); stream.end(); }); test('stream multiple entry points', function (t) { t.plan(3); const entries = fs.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']); const stream = webpack({ config: { mode: 'development' }, quiet: true }); stream.on('data', function (file) { const basename = path.basename(file.path); const contents = file.contents.toString(); switch (basename) { case 'entry.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); break; case 'anotherentrypoint.js': t.ok(/var anotherentrypoint = true;/i.test(contents), 'should contain "var anotherentrypoint = true;"'); break; } }); entries.pipe(named()).pipe(stream); }); test('empty input stream', function (t) { t.plan(1); const entry = fs.src('test/path/to/nothing', { allowEmpty: true }); const stream = webpack({ config: {}, quiet: true }); let data = null; stream.on('data', function (file) { data = file; }); stream.on('end', function () { t.ok(data === null, 'should not write any output'); }); entry.pipe(named()).pipe(stream); }); test('multi-compile', function (t) { t.plan(3); const stream = webpack({ quiet: true, config: [{ mode: 'development', entry: { one: path.join(base, 'entry.js') }, output: { filename: '[name].bundle.js' } }, { mode: 'development', entry: { two: path.join(base, 'anotherentrypoint.js') }, output: { filename: '[name].bundle.js' } }] }); stream.on('data', function (file) { const basename = path.basename(file.path); const contents = file.contents.toString(); switch (basename) { case 'one.bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); break; case 'two.bundle.js': t.ok(/var anotherentrypoint = true;/i.test(contents), 'should contain "var anotherentrypoint = true;"'); break; } }); stream.end(); }); test('no options', function (t) { t.plan(1); const stream = webpack(); stream.on('end', function () { t.ok(true, 'ended without error'); }); stream.end(); }); test('config file path with webpack-stream options', function (t) { t.plan(1); const stream = webpack({ quiet: true, config: path.join(base, 'webpack.config.js') }); stream.on('end', function () { t.ok(true, 'config successfully loaded from file, with webpack-stream options'); }); stream.end(); }); test('error formatting', function (t) { t.plan(2); // TODO: Fix this to test to rely less on large string outputs as those can change // and still be ok. const expectedMessage = '\x1b[31mError\x1b[39m in plugin "\x1b[36mwebpack-stream\x1b[39m"\nMessage:\n Module Error (from ./test/fake-error-loader.js):\nFake '; const entry = fs.src('test/fixtures/entry.js'); const stream = webpack({ quiet: true, config: { module: { rules: [ { test: /\.js$/, enforce: 'pre', use: './test/fake-error-loader' } ] } } }); stream.on('error', function (err) { t.equal(err.toString().slice(0, expectedMessage.length), expectedMessage, 'error message'); }); stream.on('compilation-error', function (err) { t.equal(err.toString().slice(0, expectedMessage.length), expectedMessage, 'compilation-error message'); }); entry.pipe(stream); }); node-webpack-stream-7.0.0/test/fixtures/0000775000175000017500000000000014113320500017203 5ustar emfoxemfoxnode-webpack-stream-7.0.0/test/fixtures/webpack.config.js0000664000175000017500000000021514113320500022417 0ustar emfoxemfox// Test config file for 'option file path' test. const config = { input: './entry.js' // input: './nope.js' }; module.exports = config; node-webpack-stream-7.0.0/test/fixtures/one.js0000664000175000017500000000002014113320500020312 0ustar emfoxemfoxvar one = true; node-webpack-stream-7.0.0/test/fixtures/entry.js0000664000175000017500000000016714113320500020706 0ustar emfoxemfoxvar test = true; var one = require('./one.js'); require(['./chunk.js'], function(chunk) { console.log('chunk!') }); node-webpack-stream-7.0.0/test/fixtures/chunk.js0000664000175000017500000000002214113320500020643 0ustar emfoxemfoxvar chunk = true; node-webpack-stream-7.0.0/test/fixtures/anotherentrypoint.js0000664000175000017500000000003614113320500023334 0ustar emfoxemfoxvar anotherentrypoint = true; node-webpack-stream-7.0.0/test/fake-error-loader.js0000664000175000017500000000040414113320500021167 0ustar emfoxemfoxmodule.exports = function fakeErrorLoader (text) { this.cacheable(); const fakeError = new Error('Fake error'); // delete stack trace prevent it from showing up in webpack output delete fakeError.stack; this.emitError(fakeError); return text; }; node-webpack-stream-7.0.0/readme.md0000664000175000017500000001767014113320500016145 0ustar emfoxemfox# webpack-stream [![Build Status](http://img.shields.io/travis/shama/webpack-stream.svg)](https://travis-ci.org/shama/webpack-stream) Run [webpack](https://github.com/webpack/webpack) as a stream to conveniently integrate with gulp. [![NPM](https://nodei.co/npm/webpack-stream.png?downloads=true)](https://nodei.co/npm/webpack-stream/) ## Installation If you have `npm` run the following command in the console `npm install --save-dev webpack-stream` ## Usage ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); gulp.task('default', function() { return gulp.src('src/entry.js') .pipe(webpack()) .pipe(gulp.dest('dist/')); }); ``` The above will compile `src/entry.js` into assets with webpack into `dist/` with the output filename of `[hash].js` (webpack generated hash of the build). You can pass webpack options in with the first argument, including `watch` which will greatly decrease compilation times: ```js return gulp.src('src/entry.js') .pipe(webpack({ watch: true, module: { rules: [ { test: /\.css$/, loader: 'style!css' }, ], }, })) .pipe(gulp.dest('dist/')); ``` Or just pass in your `webpack.config.js`: ```js return gulp.src('src/entry.js') .pipe(webpack( require('./webpack.config.js') )) .pipe(gulp.dest('dist/')); ``` If you would like to use a different version of webpack than the one this plugin uses, pass in an optional 2nd argument: ```js const gulp = require('gulp'); const webpack = require('webpack'); const gulpWebpack = require('webpack-stream'); gulp.task('default', function() { return gulp.src('src/entry.js') .pipe(gulpWebpack({}, webpack)) .pipe(gulp.dest('dist/')); }); ``` Pass in 3rd argument if you want to access the stats outputted from webpack when the compilation is done: ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); gulp.task('default', function() { return gulp.src('src/entry.js') .pipe(webpack({ /* config */ }, null, function(err, stats) { /* Use stats to do more things if needed */ })) .pipe(gulp.dest('dist/')); }); ``` #### Usage with gulp watch To use gulp `watch`, it's required that you explicitly pass webpack in the 2nd argument for a cached `compiler` instance to be used on subsequent runs. Please note that gulp `watch` and webpack `watch` are mutually exclusive. ```javascript const gulp = require('gulp'); const compiler = require('webpack'); const webpack = require('webpack-stream'); gulp.task('build', function() { return gulp.src('src/entry.js') .pipe(webpack({ /* config */ }, compiler, function(err, stats) { /* Use stats to do more things if needed */ })) .pipe(gulp.dest('dist/')); }); gulp.task('default', ['build'], function() { gulp.watch(['src/**/*.js'], gulp.series('build')); }); ``` #### Multiple Entry Points A common request is how to handle multiple entry points. You can continue to pass in an `entry` option in your typical webpack config like so: ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); gulp.task('default', function() { return gulp.src('src/entry.js') .pipe(webpack({ entry: { app: 'src/app.js', test: 'test/test.js', }, output: { filename: '[name].js', }, })) .pipe(gulp.dest('dist/')); }); ``` Or pipe files through a stream that names the chunks. A convenient library for this is [vinyl-named](https://github.com/shama/vinyl-named): ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); const named = require('vinyl-named'); gulp.task('default', function() { return gulp.src(['src/app.js', 'test/test.js']) .pipe(named()) .pipe(webpack()) .pipe(gulp.dest('dist/')); }); ``` The above `named()` stream will add a `.named` property to the vinyl files passing through. The `webpack()` stream will read those as entry points and even group entry points with common names together. #### Source Maps Source maps are built into webpack, specify a [devtool](https://webpack.github.io/docs/configuration.html#devtool): ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); const named = require('vinyl-named'); gulp.task('default', function() { return gulp.src(['src/app.js', 'test/test.js']) .pipe(named()) .pipe(webpack({ devtool: 'source-map' })) .pipe(gulp.dest('dist/')); }); ``` Now the appropriate `.map` files will be emitted. Or set to `inline-source-map` to inline the source maps into the files. If you need further special handling of source maps, such as using with [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) then just pipe to a stream and handle the source map files emitted by webpack: ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); const named = require('vinyl-named'); const through = require('through2'); const sourcemaps = require('gulp-sourcemaps'); gulp.task('default', function() { return gulp.src(['src/app.js', 'test/test.js']) .pipe(named()) .pipe(webpack({ devtool: 'source-map' })) .pipe(sourcemaps.init({loadMaps: true})) .pipe(through.obj(function (file, enc, cb) { // Dont pipe through any source map files as it will be handled // by gulp-sourcemaps const isSourceMap = /\.map$/.test(file.path); if (!isSourceMap) this.push(file); cb(); })) .pipe(sourcemaps.write('.')) .pipe(gulp.dest('dist/')); }); ``` #### Multi-compiler support Multiple compilers are supported, but instead of passing the webpack configuration directly, you have to wrap it in an object under the key 'config'. ```js const gulp = require('gulp'); const webpack = require('webpack-stream'); gulp.task('default', function() { return gulp.src('src/entry.js') .pipe(webpack({ config : require('./webpack.config.js') })) .pipe(gulp.dest('dist/')); }); ``` ## Release History * Please check the [commit log](https://github.com/shama/webpack-stream/commits/master) in the future for release history. * 4.0.0 - Update `webpack` to `^3.4.1`. Update `memory-fs` and `vinyl` dependencies. Emit `compilation-error` instead of `error` when watching (@jeroennoten). Fix error when compiler throws an error (@renminghao). Fix error when stats is undefined (@Simek). * 3.2.0 - Ability to use multiple compilers (@saschagehlich). * 3.1.0 - Better error output (@hi-q). * 3.0.1 - Fix fonts being passed through streams (@mattlewis92). * 3.0.0 - Remove special handling of source maps. Update dependencies. * 2.3.0 - Emit stats.compilation.errors as `error` (@JakeChampion). * 2.2.0 - Add support for source maps (@OliverJAsh). * 2.1.0 - Avoid modifying options by reference (@shinuza). Replace log with correct package name (@vinnymac). * 2.0.0 - Rename to webpack-stream and now it's totally not a gulp plugin. * 1.5.0 - Update webpack to 1.9.x (@nmccready). Update other dependencies. * 1.4.0 - Update webpack to 1.8.x (@Zolmeister). * 1.3.2 - Fix another place with ? in name (@raphaelluchini). * 1.3.1 - Fix for paths with ? in their name (@raphaelluchini). * 1.3.0 - Updating to webpack >= 1.7. * 1.2.0 - Updating to webpack >= 1.5, vinyl >= 0.4, memory-fs >= 0.2. * 1.1.2 - Fixes to default stats for logging (@mdreizin). * 1.1.1 - Add additional stats to default logging (@mdreizin). * 1.1.0 - Exposes internal webpack if asked via `require('webpack-stream').webpack` * 1.0.0 - Support named chunks pipe'd in for multiple entry points. * 0.4.1 - Fixed regression for multiple entry point support. * 0.4.0 - Display an error message if there are no input files (@3onyc). Add message on why task is not finishing, Add ability to track compilation progress, Add ability to configure stats output via options (@kompot). Bump webpack version (@koistya). * 0.3.0 - Update deps (@kompot). Fixes to determining entry (@btipling and @abergs). * 0.2.0 - Support for `watch` mode (@ampedandwired). * 0.1.0 - Initial release ## License Copyright (c) 2021 Kyle Robinson Young Licensed under the MIT license. node-webpack-stream-7.0.0/package.json0000664000175000017500000000230514113320500016641 0ustar emfoxemfox{ "name": "webpack-stream", "version": "7.0.0", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", "repository": "shama/webpack-stream", "author": { "name": "Kyle Robinson Young", "email": "kyle@dontkry.com", "url": "http://dontkry.com" }, "engines": { "node": ">= 10.0.0" }, "scripts": { "start": "gulp", "debug": "node --inspect-brk ./node_modules/.bin/gulp", "test": "semistandard && node test/test.js" }, "files": [ "index.js" ], "semistandard": { "ignore": [ "test/fixtures", "examples" ] }, "dependencies": { "fancy-log": "^1.3.3", "lodash.clone": "^4.3.2", "lodash.some": "^4.2.2", "memory-fs": "^0.5.0", "plugin-error": "^1.0.1", "supports-color": "^8.1.1", "through": "^2.3.8", "vinyl": "^2.2.1" }, "devDependencies": { "gulp": "^4.0.2", "rimraf": "^3.0.2", "semistandard": "^16.0.1", "tape": "^5.3.1", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0", "webpack": "^5.21.2" }, "peerDependencies": { "webpack": "^5.21.2" }, "keywords": [ "gulpplugin", "webpack", "stream" ] } node-webpack-stream-7.0.0/index.js0000664000175000017500000001755014113320500016030 0ustar emfoxemfox'use strict'; const fancyLog = require('fancy-log'); const PluginError = require('plugin-error'); const supportsColor = require('supports-color'); const File = require('vinyl'); const MemoryFileSystem = require('memory-fs'); const nodePath = require('path'); const through = require('through'); const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const clone = require('lodash.clone'); const defaultStatsOptions = { colors: supportsColor.stdout.hasBasic, hash: false, timings: false, chunks: false, chunkModules: false, modules: false, children: true, version: true, cached: false, cachedAssets: false, reasons: false, source: false, errorDetails: false }; module.exports = function (options, wp, done) { const cache = { options: options, wp: wp }; options = clone(options) || {}; let config = options.config || options; const isInWatchMode = !!options.watch; delete options.watch; if (typeof config === 'string') { config = require(config); } // Webpack 4 doesn't support the `quiet` attribute, however supports // setting `stats` to a string within an array of configurations // (errors-only|minimal|none|normal|verbose) or an object with an absurd // amount of config const isSilent = options.quiet || (typeof options.stats === 'string' && (options.stats.match(/^(errors-only|minimal|none)$/))); if (typeof done !== 'function') { let callingDone = false; done = function (err, stats) { if (err) { // The err is here just to match the API but isnt used return; } stats = stats || {}; if (isSilent || callingDone) { return; } // Debounce output a little for when in watch mode if (isInWatchMode) { callingDone = true; setTimeout(function () { callingDone = false; }, 500); } if (options.verbose) { fancyLog(stats.toString({ colors: supportsColor.stdout.hasBasic })); } else { const statsOptions = (options && options.stats) || {}; if (typeof statsOptions === 'object') { Object.keys(defaultStatsOptions).forEach(function (key) { if (typeof statsOptions[key] === 'undefined') { statsOptions[key] = defaultStatsOptions[key]; } }); } const statusLog = stats.toString(statsOptions); if (statusLog) { fancyLog(statusLog); } } }; } const webpack = wp || require('webpack'); let entry = []; const entries = Object.create(null); const stream = through(function (file) { if (file.isNull()) { return; } if ('named' in file) { if (!Array.isArray(entries[file.named])) { entries[file.named] = []; } entries[file.named].push(file.path); } else { entry = entry || []; entry.push(file.path); } }, function () { const self = this; const handleConfig = function (config) { config.output = config.output || {}; // Determine pipe'd in entry if (Object.keys(entries).length > 0) { entry = entries; if (!config.output.filename) { // Better output default for multiple chunks config.output.filename = '[name].js'; } } else if (entry.length < 2) { entry = entry[0] || entry; } config.entry = config.entry || entry; config.output.path = config.output.path || process.cwd(); entry = []; if (!config.entry || config.entry.length < 1) { fancyLog('webpack-stream - No files given; aborting compilation'); self.emit('end'); return false; } return true; }; let succeeded; if (Array.isArray(config)) { for (let i = 0; i < config.length; i++) { succeeded = handleConfig(config[i]); if (!succeeded) { return false; } } } else { succeeded = handleConfig(config); if (!succeeded) { return false; } } // Cache compiler for future use const compiler = cache.compiler || webpack(config); cache.compiler = compiler; const callback = function (err, stats) { if (err) { self.emit('error', new PluginError('webpack-stream', err)); return; } const jsonStats = stats ? stats.toJson() || {} : {}; const errors = jsonStats.errors || []; if (errors.length) { const resolveErrorMessage = (err) => { if ( typeof err === 'object' && err !== null && Object.prototype.hasOwnProperty.call(err, 'message') ) { return err.message; } else if ( typeof err === 'object' && err !== null && 'toString' in err && err.toString() !== '[object Object]' ) { return err.toString(); } else if (Array.isArray(err)) { return err.map(resolveErrorMessage).join('\n'); } else { return err; } }; const errorMessage = errors.map(resolveErrorMessage).join('\n'); const compilationError = new PluginError('webpack-stream', errorMessage); if (!isInWatchMode) { self.emit('error', compilationError); } self.emit('compilation-error', compilationError); } if (!isInWatchMode) { self.queue(null); } done(err, stats); if (isInWatchMode && !isSilent) { fancyLog('webpack is watching for changes'); } }; if (isInWatchMode) { const watchOptions = options.watchOptions || {}; compiler.watch(watchOptions, callback); } else { compiler.run(callback); } const handleCompiler = function (compiler) { if (options.progress) { (new ProgressPlugin(function (percentage, msg) { percentage = Math.floor(percentage * 100); msg = percentage + '% ' + msg; if (percentage < 10) msg = ' ' + msg; fancyLog('webpack', msg); })).apply(compiler); } cache.mfs = cache.mfs || new MemoryFileSystem(); const fs = compiler.outputFileSystem = cache.mfs; const assetEmittedPlugin = compiler.hooks // Webpack 4/5 ? function (callback) { compiler.hooks.assetEmitted.tapAsync('WebpackStream', callback); } // Webpack 2/3 : function (callback) { compiler.plugin('asset-emitted', callback); }; assetEmittedPlugin(function (outname, _, callback) { const file = prepareFile(fs, compiler, outname); self.queue(file); callback(); }); }; if (Array.isArray(options.config)) { compiler.compilers.forEach(function (compiler) { handleCompiler(compiler); }); } else { handleCompiler(compiler); } if (options.watch && !isSilent) { const watchRunPlugin = compiler.hooks // Webpack 4/5 ? callback => compiler.hooks.watchRun.tapAsync('WebpackInfo', callback) // Webpack 2/3 : callback => compiler.plugin('watch-run', callback); watchRunPlugin((compilation, callback) => { fancyLog('webpack compilation starting...'); callback(); }); } }); // If entry point manually specified, trigger that const hasEntry = Array.isArray(config) ? config.some(function (c) { return c.entry; }) : config.entry; if (hasEntry) { stream.end(); } return stream; }; function prepareFile (fs, compiler, outname) { let path = fs.join(compiler.outputPath, outname); if (path.indexOf('?') !== -1) { path = path.split('?')[0]; } const contents = fs.readFileSync(path); const file = new File({ base: compiler.outputPath, path: nodePath.join(compiler.outputPath, outname), contents: contents }); return file; } // Expose webpack if asked Object.defineProperty(module.exports, 'webpack', { get: function () { return require('webpack'); } }); node-webpack-stream-7.0.0/gulpfile.js0000664000175000017500000000077414113320500016530 0ustar emfoxemfoxconst gulp = require('gulp'); const webpack = require('./'); const rimraf = require('rimraf'); const named = require('vinyl-named'); gulp.task('default', function () { rimraf.sync('tmp'); return gulp.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']) .pipe(named()) .pipe(webpack({ mode: 'production', devtool: 'source-map' })) .pipe(gulp.dest('tmp/')); }); gulp.task('watch', function () { gulp.watch('test/fixtures/*.js', gulp.series('default')); }); node-webpack-stream-7.0.0/examples/0000775000175000017500000000000014113320500016171 5ustar emfoxemfoxnode-webpack-stream-7.0.0/examples/incremental-builds/0000775000175000017500000000000014113320500021752 5ustar emfoxemfoxnode-webpack-stream-7.0.0/examples/incremental-builds/package.json0000664000175000017500000000056414113320500024245 0ustar emfoxemfox{ "name": "incremental-builds", "version": "0.1.0", "description": "", "main": "gulpfile.js", "scripts": { "start": "budo index.js", "test": "node test.js" }, "author": "Kyle Robinson Young (http://dontkry.com)", "license": "MIT", "devDependencies": { "gulp": "^3.9.0", "mkdirp": "^0.5.1", "rimraf": "^2.5.0" } } node-webpack-stream-7.0.0/examples/incremental-builds/gulpfile.js0000664000175000017500000000120714113320500024117 0ustar emfoxemfoxvar gulp = require('gulp'); var webpack = require('../../index.js'); var rimraf = require('rimraf'); var mkdirp = require('mkdirp'); var path = require('path'); var fs = require('fs'); gulp.task('default', function () { return gulp.src('entry.js') .pipe(webpack()) .pipe(gulp.dest('dist/')); }); gulp.task('watch', function () { gulp.watch('lib/*.js', ['default']); }); gulp.task('setup', function (done) { var lib = path.join(__dirname, 'lib'); mkdirp(lib, function () { for (var i = 0; i < 99; i++) { fs.writeFileSync(path.join(lib, 'file' + i + '.js'), 'module.exports = "' + i + '";'); } done(); }); }); node-webpack-stream-7.0.0/examples/incremental-builds/entry.js0000664000175000017500000000013014113320500023443 0ustar emfoxemfoxvar alllibs = require.context('./lib', true, /\.js$/); alllibs.keys().forEach(alllibs); node-webpack-stream-7.0.0/examples/incremental-builds/README.md0000664000175000017500000000060614113320500023233 0ustar emfoxemfox# webpack-stream incremental builds Incremental builds work natively as long as you keep webpack in memory. Run `gulp watch`. This example loads all the `.js` files from within the `./lib` folder. The first time it builds, it takes ~400ms. Then you edit a single file in the `./lib` folder which triggers gulp's watch to run the `default` task. Those subsequent builds only take ~100ms. node-webpack-stream-7.0.0/examples/incremental-builds/.gitignore0000664000175000017500000000002614113320500023740 0ustar emfoxemfoxnode_modules dist lib node-webpack-stream-7.0.0/LICENSE-MIT0000664000175000017500000000204714113320500016012 0ustar emfoxemfoxCopyright (c) 2021 Kyle Robinson Young Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node-webpack-stream-7.0.0/.travis.yml0000664000175000017500000000007314113320500016464 0ustar emfoxemfoxlanguage: node_js node_js: - 10 - 12 - 14 - 'node' node-webpack-stream-7.0.0/.gitignore0000664000175000017500000000005514113320500016343 0ustar emfoxemfoxnode_modules tmp package-lock.json yarn.lock node-webpack-stream-7.0.0/.github/0000775000175000017500000000000014113320500015713 5ustar emfoxemfoxnode-webpack-stream-7.0.0/.github/issue_template.md0000664000175000017500000000132114113320500021255 0ustar emfoxemfoxBefore submitting an issue, please search the issue tracker first. Your issue may already be solved or closed for a previous reason. If you have a general question about webpack or gulp or streams please use their appropriate support channels or stackoverflow.com. Not this issue tracker please. When submitting an issue, please provide: * A detailed description of the issue. * Steps on how to reproduce. Keep in mind, this is not a gulp plugin. If your issue relates to gulp you are fully expected to reduce your issue to how it relates to this library. Your issue can be closed for any reason. It's nothing personal. Just a consequence of a lot of users and only 1 active maintainer. Thank you for understanding. node-webpack-stream-7.0.0/.editorconfig0000664000175000017500000000022014113320500017022 0ustar emfoxemfoxroot=true [*] end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 charset = utf-8 trim_trailing_whitespace = true