catdad / gulp-graceful-error Goto Github PK
View Code? Open in Web Editor NEW:sunglasses: allow failing tasks to continue the build while still failing
:sunglasses: allow failing tasks to continue the build while still failing
https://github.com/catdad/mock-stdio
This module supports node 10 with the new buffers and whatnot, so it's a better bet than the current custom implementation.
Use the appropriate sub-library instead.
๐ npx gulp watch:all
[17:25:30] Using gulpfile ~/Code/krainboltgreene/deushack/gulpfile.js
[17:25:30] Starting 'build:@internal'...
[17:25:30] Starting 'build:styles'...
[17:25:30] Starting 'build:images'...
[17:25:30] Starting 'build:assets'...
[17:25:30] Starting 'build:fonts'...
[17:25:30] Finished 'build:images' after 9.27 ms
[17:25:30] Finished 'build:styles' after 18 ms
[17:25:30] Finished 'build:assets' after 53 ms
[17:25:30] Finished 'build:fonts' after 54 ms
[17:25:30] Starting 'build:client'...
[17:25:31] Finished 'build:@internal' after 1.67 s
[17:25:31] Starting 'build:server'...
[17:25:32] Finished 'build:server' after 598 ms
[17:25:34] client index.js 2.3 MB
[17:25:34] Finished 'build:client' after 4.19 s
[17:25:34] Starting 'watch:all'...
[17:25:34] Finished 'watch:all' after 36 ms
Here we see the build:client
task running successfully.
Now we add a syntax error:
[17:26:03] Starting 'build:styles'...
[17:26:03] Starting 'build:images'...
[17:26:03] Starting 'build:assets'...
[17:26:03] Starting 'build:fonts'...
[17:26:03] Finished 'build:images' after 8.75 ms
[17:26:03] Finished 'build:styles' after 20 ms
[17:26:03] Finished 'build:assets' after 17 ms
[17:26:03] Finished 'build:fonts' after 19 ms
[17:26:03] Starting 'build:client'...
{ SyntaxError: /Users/krainboltgreene/Code/krainboltgreene/deushack/source/client/application/index.js: Invalid left-hand side in assignment expression (22:14)
20 | )
21 |
> 22 | const DOM = mapValues(infuse(shell()))(state)=.debug()
| ^
23 |
24 | DOM.setDebugListener(console.log.bind(console))
25 |
at Parser.pp$5.raise (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp$2.toAssignable (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:3008:16)
at Parser.pp$3.parseMaybeAssign (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:3349:45)
at Parser.pp$1.parseVar (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:2340:24)
at Parser.pp$1.parseVarStatement (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:2169:8)
at Parser.pp$1.parseStatement (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:1861:19)
at Parser.pp$1.parseBlockBody (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:2268:21)
at Parser.pp$1.parseBlock (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:2247:8)
at Parser.pp$3.parseFunctionBody (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:4235:22)
at Parser.pp$1.parseFunction (/Users/krainboltgreene/Code/krainboltgreene/deushack/node_modules/babylon/lib/index.js:2386:8)
...
And when the syntax error is fixed?
[17:26:54] Starting 'build:styles'...
[17:26:54] Starting 'build:images'...
[17:26:54] Starting 'build:assets'...
[17:26:54] Starting 'build:fonts'...
[17:26:54] Finished 'build:images' after 3.7 ms
[17:26:54] Finished 'build:styles' after 7.6 ms
[17:26:54] Finished 'build:assets' after 8.11 ms
[17:26:54] Finished 'build:fonts' after 7.89 ms
This method should gracefully fail the build on the first error, and then ignore all other errors. For some reason, gulp-istanbul
errors like a million times (I am guessing once per file) when running tests with .only
on one of the tests, causing a million errors to be logged to the point where I can't see anything in the console. Thought this method might be useful.
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.