-
Notifications
You must be signed in to change notification settings - Fork 304
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
Add support for running the app directly #2
Comments
Great work! this would also be nice for the |
My implementation actually just downloads node-webkit for all versions in the options, instead of the one for your current platform. It could completely fail |
I would just download the current platform. So if you are on a mac just download the mac version and ignore the |
👍 |
The first version is published to npm - should add tests at some point :) Tell me what you think |
Thanks!
|
So now it downloads only the current platform, but only in the CLI. I'm using the module directly, so running it would still download the platforms in the options. Ideally, you should be able to do nwb = new NwBuilder({
files: 'app/**/*',
platforms: ['mac'] // (doesn't contain current platform)
});
nwb.run(); // only dl current platform (only windows for instance)
setTimeout(function(){
nwb.build(); // dl chosen platforms (only mac)
}, require("timespan")("5 years").ms()); Changing |
hmm why are you not using the CLI version for running nw? It wasn't designed to be used programmatically. What exactly are you trying to do? I don't really get it from the code above. |
Well it didn't exist when I started using the module and also using a cakefile/gulpfile lets you do more with one command, like compiling coffeescript before building/running the app. And not just with a command, but with a keyboard shortcut (^b) in Sublime Text.
It should be, as it's a real use case, and a recommended one: "For Gulp, just use the module"? |
My team definitely will be using this only programmatically |
I'd like to make a pull request with the small change of moving the platform-choosing out of the CLI and into the API |
Got this working, although I found the use of the Thoughts? I can put together a PR... |
Put together a PR and let's check it out. |
I've added this functionality here: 1j01@b0d35f2 but without any tests or anything. Also "really" it should be added to a new NwRunner.
The text was updated successfully, but these errors were encountered: