Breaking: Allow -- as args separators (fixes #188)#207
Breaking: Allow -- as args separators (fixes #188)#207arturadib merged 1 commit intoshelljs:masterfrom
Conversation
make.js
Outdated
There was a problem hiding this comment.
this comment was meant to go right above the setTimeout below, otherwise it's puzzling :)
|
OK, so it just occurred to me that some folks (including one of our largest users, PDF.js) pass arguments directly to targets from within the script itself, see e.g. https://github.com/mozilla/pdf.js/blob/master/make.js#L473. I don't think this would break things for them unless they started using the new If the PDF.js folks are OK with this let's 🐑 it! |
|
It would break right now because I'm always passing an empty array if |
|
That's not how it works. The |
Cool, can we try that? |
|
Updated. |
|
Merging this in. @brendandahl @yurydelendik please let me know if this breaks the build for PDF.js! |
Breaking: Allow -- as args separators (fixes #188)
|
this is now in |
|
Yay, thanks! |
This implements a change that allows
--to indicate arguments to be passed tomaketargets. Basically, you can do this:And
argswill be everything after the--on the command line, so for example:argsin the previous code will be['bar', 'baz'].I noticed there's a
forceargument for targets, but I couldn't find anywhere it's documented or used. So, I moved it to be the second argument as it seems mostly unused at the moment.Other caveats:
make.js, so I didn't know if it's okay to just make changes. I did test it locally with an example file and it workednpm testfails for me (I'm on Windows using Git Bash) and I couldn't figure out how to get it to run, so I'm not really sure about this change.@arturadib let me know if this is okay or if you'd like other changes.