Git Product home page Git Product logo

Comments (4)

ehmicky avatar ehmicky commented on June 15, 2024

I would be curious about the opinion of @crissdev on this, but I think it's a problem with Gulp, not with gulp-yaml. Specifically if for any reason this plugin has incorrect input (including a wrong comma at end of a line), it should emit an error event to the underlying stream.

Your problem seems to be that gulp.watch() stops when any Gulp plugin emits an error event. This problem was fixed in the latest version of Gulp (version 4), you should try to upgrade to it.

from gulp-yaml.

crissdev avatar crissdev commented on June 15, 2024

@zz5840 @ehmicky Sorry for the delay on this one.

file.contents = getFileContents(file, options, stream, callback)

It seems getFileContents returns null/undefined if the parsed file has a syntax error. I cannot test this right now but maybe this might be the case.

Furthermore, I see the callback is called twice in case of an error (L63 && L27)

@zz5840 Could you edit node_modules\gulp-yaml\indexjs in line 24, with the follwing snippet and see if it solves this problem?

const result = getFileContents(file, options, stream, callback)

if (result) file.contents = result

from gulp-yaml.

zz5840 avatar zz5840 commented on June 15, 2024

@crissdev
it's affected, but when will you update and publish it to npm, or need i create a pr

from gulp-yaml.

zz5840 avatar zz5840 commented on June 15, 2024

@ehmicky oh thx, it's really helpful

from gulp-yaml.

Related Issues (6)

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.