Giter VIP home page Giter VIP logo

Comments (9)

medikoo avatar medikoo commented on June 7, 2024

Can you prepare some good test case, that would reproduce that on my side? I haven't seen issues using ignoreErrors option.

from modules-webmake.

fluidblue avatar fluidblue commented on June 7, 2024

I created a test: https://github.com/fluidblue/webmake-test

When you execute make, webmake is called without --ignoreerrors and everything is fine. When executing make test, webmake is called with --ignoreerrors and it throws an error like this:

webmake --ext=coffee --ignoreerrors ./src/test.coffee ./build/test.js

/usr/local/lib/node_modules/webmake/node_modules/deferred/lib/_ext.js:71
            throw this.value;
                      ^
Error: ENOENT, open '/Users/max/Desktop/webmake-test/build/test.js'

from modules-webmake.

medikoo avatar medikoo commented on June 7, 2024

@fluidblue thanks.

Issue lies in your build script, you call: webmake --ext=coffee --ignoreerrors ./src/test.coffee ./build/test.js, which translates to webmake('./build/test.js', { ext: 'coffee', sourceMap: false, ignoreErrors: false }).

Thing is that it should be --ignore-errors, not --ignoreerrors. Latter is unrecognized option, and argument that follows that is taken as its value (it's swallowed).

I'll rename this issue, to "Improve shell script arguments handling", and leave it open until we have it more bulletproof so such errors doesn't come as unnoticed.

from modules-webmake.

fluidblue avatar fluidblue commented on June 7, 2024

Ah I see. Now it works.

It is a little bit confusing, that the sourceMap option is --sourcemap on the commandline whereas ignoreErrors is --ignore-errors

It might be helpful to include the commandline equivalents in the options documentation.

from modules-webmake.

medikoo avatar medikoo commented on June 7, 2024

@fluidblue that's true, it's not consistent. I'll probably fix this and assure consistency from v0.4

from modules-webmake.

boxxxie avatar boxxxie commented on June 7, 2024

please update the docs with examples of how to use the command line args. it's not obvious that the args should be used in the way you describe in this issue.

i've run into this issue as well, but with different arguments (sourcemap).

from modules-webmake.

medikoo avatar medikoo commented on June 7, 2024

@boxxxie in documentation, there's a command line name for each option provided: https://github.com/medikoo/modules-webmake#options, e.g.:

Screenshot 2023-06-09 at 10 53 54

How would you improve it?

from modules-webmake.

boxxxie avatar boxxxie commented on June 7, 2024

examples, like how man files give a few examples of command use.

in this case, i have no idea how to use sourcemap when writing my script. do i do -- sourcemap -sourcemap --sourcemap or just sourcemap

from modules-webmake.

medikoo avatar medikoo commented on June 7, 2024

@boxxxie this falls into general knowledge on construction of CLI params. Follow: https://betterdev.blog/command-line-arguments-anatomy-explained/

from modules-webmake.

Related Issues (20)

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.