v8-argv
v8-argv copied to clipboard
remove support for proxying to another file
instead it now exports true if it creates a new process and false otherwise. This means you don't need to have two executables which means it will be faster and in my opinion cleaner. This means you can't pass args like --harmony to your main executable but you can put them in the hash bang anyway. So if you want to always run with --harmony set you do #!/usr/bin/env node --harmony.
I think I would always prefer this API but if you think some people might prefer the current one I'm happy to maintain a fork.
I like what you have done here making it so you don't need to specify a script but I think I would still prefer to optionally proxy to a separate script if the situation calls for it. For example, I use this module in goodwin to prepare arguments for hydro.
// default
if (require('v8-argv')()) return;
// alternative
require('v8-argv').spawn('hydro', {
v8: [ '--harmony' ],
argv: [ '--setup', 'hydro.conf.js' ]
});
Might be something to consider. If this is not something you are interested in tackling I will probably merge your changes and see what I can do.
PS: As an aside, never change the version number when opening a pull request.
Hmm I think we might be best just to keep them separate in the end. They both have merit but since you would never use both at the same time I think they may aswell be separate modules.
Thanks for mentioning the version thing. I'll remove that commit if you decide to merge.