-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow passing args to run #8
Comments
Hi @innovate-invent - do you have a specific use case for this? Happy to add support, just curious about the utility 😄 |
Applications installed via this utility can be run via the run() interface. Those applications expect command line arguments. |
This would really help with a transient dependency here: wasm-tool/rollup-plugin-rust@9027e61 An alternative would be making |
I'd love this as well — use case is calling Wrangler programmatically from a CI script written in JavaScript. |
Adding on top of this, returning from run would also be helpful. It's useful for projects that want the main CLI tool to be written in Node, but certain parts of it to be written in another language. For example if a CLI tool was written for a programming language: const compiler = require("./compiler") // loads a compiler binary
function command_install(...) {...} // uses axios to install a package
function command_compile(...) {
const args = preprocess(...) // do some preprocessing
const stdout = compiler.run(args)
postprocess(stdout)
} If the language compiles to JavaScript, you may want to use an existing node package to minify the output before the file is saved to the system, but use a language better suited for compilation such as Rust to generate that initial output. |
Ideally, the run command should accept args in place of process.argv.
The text was updated successfully, but these errors were encountered: