Comments (8)
gulp.task('watch', [], function(callback) {
var webpack = new WebpackGlob(compilerOptions, webpackOptions);
webpack.watch('./src/**/webpack.config.js').then(function() {
callback();
}).catch(function(err) {
callback(new gutil.PluginError('webpack', err));
});
});
from webpack-cluster.
I assume that's for watching changes to the config file?
What about watching changes to JS to rebuild the bundle ? (per your example in the webpack-config-stream
README)
Here's what I have so far:
gulp.task('build:webpack', function(callback) {
var webpack = new webpackGlob(compilerOptions, configOptions)
webpack.run(configFilename)
});
gulp.task('watch:webpack', ['build:webpack'], function(callback) {
var webpack = new webpackGlob(compilerOptions, configOptions)
gulp.watch(webpackWatch).on('change', function(event) {
if (event.type === 'changed') {
webpack.run(configFilename)
}
})
});
This doesn't seem to work - gulp gets stuck and I can't even Ctrl+C
out of it.
from webpack-cluster.
@timc13 I'm working on new version which will fix some issues (Ctrl+C
as well).
You don't need to call webpack.run
, because webpack-glob
uses gaze
for watching.
from webpack-cluster.
@timc13 just call webpack.watch
with minimatch
pattern.
from webpack-cluster.
I'm sorry, maybe I'm missing something I've tried an array of strings, a single string with comma-delimited globs and separate arguments and nothing seems to be triggering a rebuild.
Here's what I got:
gulp.task('build:webpack', function(callback) {
var webpack = new webpackGlob(compilerOptions, configOptions)
webpack.run(configFilename).then(function() {
callback()
}).catch(function(err) {
callback(new gutil.PluginError('webpack', err))
})
});
gulp.task('watch:webpack', ['build:webpack'], function(callback) {
var webpack = new webpackGlob(compilerOptions, configOptions)
webpack.watch(configFilename, './public/angular/**/*', '!./public/angular/**/*.html').then(function() {
callback()
}).catch(function(err) {
callback(new gutil.PluginError('webpack', err))
})
});
from webpack-cluster.
@timc13 I will fix that in new version, currently only one param is accepted.
from webpack-cluster.
@timc13 Here is preview https://github.com/mdreizin/webpack-cluster/blob/es6/src/CompilerAdapter.js#L99
from webpack-cluster.
@timc13 Also please see https://github.com/mdreizin/webpack-cluster/blob/es6/.gitdown/gulpfile.js#L38
from webpack-cluster.
Related Issues (19)
- An in-range update of jasmine is breaking the build 🚨 HOT 1
- An in-range update of eslint-plugin-markdown is breaking the build 🚨
- An in-range update of nyc is breaking the build 🚨
- An in-range update of jsdoc is breaking the build 🚨 HOT 4
- An in-range update of babel-runtime is breaking the build 🚨 HOT 1
- Allowing arrays as exports from webpack-config HOT 1
- Version 10 of node.js has been released
- An in-range update of eslint-plugin-markdown is breaking the build 🚨 HOT 2
- An in-range update of jsdoc is breaking the build 🚨 HOT 3
- Push a new version of the library with the peerDependency updated HOT 6
- Consider PR into Webpack core. HOT 3
- An in-range update of babel-plugin-transform-builtin-extend is breaking the build 🚨 HOT 1
- An in-range update of codeclimate-test-reporter is breaking the build 🚨
- An in-range update of eslint is breaking the build 🚨 HOT 4
- An in-range update of eslint-loader is breaking the build 🚨 HOT 3
- An in-range update of eslint-plugin-babel is breaking the build 🚨 HOT 2
- An in-range update of fs-extra is breaking the build 🚨 HOT 2
- An in-range update of babel-eslint is breaking the build 🚨 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-cluster.