evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

More nwbuild Options? #3

Closed evshiron closed 8 years ago

evshiron commented 8 years ago

--with-ffmpeg is added now. What about --side-by-side, which doesn't combine app.nw to the executable?

evshiron commented 8 years ago

--side-by-side is added too in c2004af.

evshiron commented 8 years ago

Propose: --production, which doesn't copy the node_modules, but execute npm install --production when copying is done, which will strip devDependencies out and reduce file size.

evshiron commented 8 years ago

--production is added in 039e866.

evshiron commented 8 years ago

Propose: --win-ico and --osx-icns.

nicklaw5 commented 8 years ago

-o, --buildDir <buildPath> The build folder [default: "./build"]

evshiron commented 8 years ago

@nicklaw5 Thanks for the suggestion, added in 820718d. README and published version are also updated.

conceptualspace commented 8 years ago

+1 for icons

evshiron commented 8 years ago

@conceptualspace --win-ico and --mac-icns are added long ago. Feel free to try them out and feedback is appreciated.

conceptualspace commented 8 years ago

will do! and thanks for your work on this

MaestroJurko commented 8 years ago

Can you please update README with all the options that are available.

evshiron commented 8 years ago

@mato75 I think all the options are listed in the "Usage" section. If you want a reference, please see test/test-module.js.

MaestroJurko commented 8 years ago

Options that would be awesome to have:

argv: [], // custom arguments passed to nwjs
port: 1245 // custom port on which nwjs is running
evshiron commented 8 years ago

What the port means? Is it for --remote-debugging? It's a good proposition though. I will consider adding it in the next days.

MaestroJurko commented 8 years ago

Yes for remote debugging. I am using nwjs for testing and connecting chrome-remote-interface to it.

And also custom arguments are really useful. I am using it with web sockets.

Maybe instead of setting every available setting as an option, set argv, and user will have to add them on its own (---remote-debugging, --allow-running-insecure-content, ...) and library only reads the argv option.

evshiron commented 8 years ago

I will see how the underlying commander.js supports this.

evshiron commented 8 years ago

@mato75 Custom arguments should be usable in nwjs-builder 1.10.0. There are examples in README and test/test-nwbuild.js. Feel free to try it out.

MaestroJurko commented 8 years ago

How do you set them when used inside *.js (I dont see an extra option, that will allow me to add custom arguments)?

evshiron commented 8 years ago

@mato75 This should work:

const NWB = require('nwjs-builder');

NWB.commands.nwbuild(['--remote-debugging-port=9222', './build/', '-a', 'bbb'], {
    run: true
}, (err, code) => {});
nicklaw5 commented 8 years ago

Would be great if there was an option to include the version number in the build folder name.

For example, stryve-v0.3.0-win-x64 rather than just stryve-win-x64

evshiron commented 8 years ago

@nicklaw5 --output-name is added in nwjs-builder 1.10.5. The feature is powered by string-template and in your situation --output-name "{name}-v{version}-{target}" should do the trick.

evshiron commented 8 years ago

I am closing this issue now as it's too long. If there is any proposition, feel free to open a new issue.