Giter Site home page Giter Site logo

gulp-graceful-error's People

Contributors

catdad avatar

Watchers

 avatar  avatar  avatar

gulp-graceful-error's Issues

Once caught that particular task never runs again

๐‘“ 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

add .gracefulOnce method

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.