juanfran / gulp-multi-process Goto Github PK
View Code? Open in Web Editor NEWRun gulp tasks in separate CPU processes
Run gulp tasks in separate CPU processes
Thanks for writing gulp-multi-process
, it really speeds up my builds!
When I use gulp-multi-process
on windows though, an error is thrown:
[19:34:53] Error: spawn UNKNOWN
at exports._errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:387:9)
at C:\Users\jos\tmp\jsoneditor\node_modules\gulp-multi-process\index.js:10:18
at Array.forEach (native)
at gulpMultiProcess (C:\Users\jos\tmp\jsoneditor\node_modules\gulp-multi-process\index.js:9:9)
at Gulp.<anonymous> (C:\Users\jos\tmp\jsoneditor\gulpfile.js:263:10)
at module.exports (C:\Users\jos\tmp\jsoneditor\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (C:\Users\jos\tmp\jsoneditor\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (C:\Users\jos\tmp\jsoneditor\node_modules\orchestrator\index.js:214:10)
Would be great if gulp-multi-process
would work on windows too.
Hi!
One of the things I need to do is run webpack and watch for file changes, another I need to do is fire up dynamodb local, another one is to keep an electron app running... all of these spit out debugging information that I may need.
Ideally, I would use your plugin and combine all their output in one single stdout that I can prefix with an identifier:
[electron] debug from the app...
[webpack] reloaded stuff
[dynamodb] requested record X
is this something I can do with your plugin? (and if so, how?)
Thanks for your hard work!
Any plan to port this to gulp 4 ?
Gulp 4 have gulp.series and gulp.parallel to create the tasks dependency trees, but parallel don't uses threads/processes to execute slow tasks on different CPUs.
When additional arguments, not task names, are used, these arguments should be added to the child process argument array.
If I call
gulp --production
I would expect --production to be passed as an argument to the child processes.
The exit code of the spawned processes are not currently being checked in any way, meaning a failed sub-task will not be reported to the parent process, which will still exit with an exit code of 0.
This is particularly an issue when this module is used in a CI job running unit tests etc. as the tests could fail and the build will still pass.
When using non-boolean command line arguments e.g. "--tag foo", it only passes the first component e.g. "--tag" to child processes.
Lines 14 to 18 in ea05bae
yargs is probably the easiest way to handle all the parsing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.