-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: pass flags to io.js / node #160
Comments
I think that if this feature was implemented, the following flags could be deprecated / turned into a convenience wrapper:
|
👍 right now running |
I'm ok with this in principle, and would definitely like to be able to pass both node-flags and nyc-flags. However, the implementation in #193 of just splitting the arg on I'm wary of alternatives that involve implementing sh-compatible argument parsing of argument values, though! In general, passing a list of args as a single string is a bad smell, because it effectively requires that you Another idea, however, is to just have each flag be something that can be specified as a separate arg. For example:
It's a bit more tedious, but then it can just push each entry onto the flags list, rather than have to parse the string (and wow, you've got quotes in there... just... omg, I'm having an allergic reaction–been down that road too many times!) Maybe the tediousness could be reduced with a shorthand option? Like |
seems reasonable; reckon most of this is scripted once for a test script and then never looked at again so a bit of an odd interface shouldn't matter. I like it. |
Cool. That's a lot easier to do, and requires zero extra parsing. The code in bin/run.js has shifted around a lot, but it should be pretty easy to write a patch for this. just Maybe we should have this for nyc, too? The latest versions have added some cool support for caching, babel stuff, etc. |
If you don't feel like writing a patch, I may get to it probably this or next weekend. |
I'm churning through a backlog of my own projects atm, this isn't blocking for me so someone else writing the patch would be preferable |
Did this as |
awesome! ✨ |
io.js allows flags to be passed in on startup, of which the most interesting one for me is
-r <package>
.With
tape
it's possible to donode -r 'babel/register' test
, it'd be nice if there was a similar way to do that withtap
.E.g. maybe something like:
Is this something that's desirable?
edit: Alternatively the
-r, --require
flag could be added but that seems less flexible / future proof than having direct access to the node process.The text was updated successfully, but these errors were encountered: