busterjs/buster — Issue #102: CLI arguments for `node`
Author: rvagg
Created: 2012-02-23 08:32:29+00:00
State: open

I have a small project that uses Harmony Proxies so for the current V8 I need to run as `node --harmony-proxies` but this is currently difficult to do with Buster.

My current work-around is to hack my */usr/local/bin/buster-test* with the hashbang: `#!/usr/local/bin/node --harmony-proxies` but this obviously isn't a suitable for anything but a short-term solution.

I have 2 thoughts on this:

* It'd be great if you could pass in an `"args"` to your *buster.js* config file, or perhaps extend the existing `"env"` property so you could put `"env": "node --harmony-proxies --whatever --else"`. Then I guess that'd force a child process spawn to get the arguments in which is unfortunate but if you're going to be [spawning for CoffeeScript support](https://twitter.com/#!/augustl/status/172553093278470145) then perhaps you could make it even more generic?

* I'd be happy to have my own custom test runner executable in my project to make this happen but this is currently a bit difficult because I need to get to *buster-test-cli* which is hidden as a dependency of *buster* in my global so I can't just `require('buster-test-cli').cli.test.create().run(blahblah)`, I'd have to install *buster-test-cli* as a global or as a "devDependency" of my project. It would be handy if I could access it straight off the main Buster object so I could do something like: `require('buster').cli.test.create().run(blahblah)`. Then my exec script could start node however it wants.