2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-09-28 20:29:04 +00:00

Override output directory by default

This commit is contained in:
Jia Hao 2016-03-12 16:07:21 +08:00
parent 7ad7c346ef
commit e6dc4b8441
3 changed files with 12 additions and 12 deletions

View File

@ -150,13 +150,13 @@ Processor architecture, automatically determined based on the current OS. Can be
Electron version without the `v`, see https://github.com/atom/electron/releases. Electron version without the `v`, see https://github.com/atom/electron/releases.
#### [overwrite] #### [no-overwrite]
``` ```
-o, --overwrite --no-overwrite
``` ```
Specifies if the destination directory should be overwritten. Specifies if the destination directory should be not overwritten, defaults to false.
#### [conceal] #### [conceal]
@ -296,22 +296,22 @@ In your `.js` file:
```javascript ```javascript
var nativefier = require('nativefier').default; var nativefier = require('nativefier').default;
// possible options // possible options, defaults unless specified otherwise
var options = { var options = {
name: 'Web WhatsApp', name: 'Web WhatsApp', // will be inferred if not specified
targetUrl: 'http://web.whatsapp.com', // required targetUrl: 'http://web.whatsapp.com', // required
platform: 'darwin', platform: 'darwin', // defaults to the current system
arch: 'x64', arch: 'x64', // defaults to the current system
version: '0.36.4', version: '0.36.4',
out: '~/Desktop', out: '.',
overwrite: true, overwrite: false,
asar: false, // see conceal asar: false, // see conceal
icon: '~/Desktop/icon.png', icon: '~/Desktop/icon.png',
counter: false, counter: false,
width: 1280, width: 1280,
height: 800, height: 800,
showMenuBar: false, showMenuBar: false,
userAgent: null, userAgent: 'Mozilla ...', // will infer a default for your current system
ignoreCertificate: false, ignoreCertificate: false,
insecure: false, insecure: false,
honest: false honest: false

View File

@ -25,7 +25,7 @@ if (require.main === module) {
.option('-p, --platform <value>', '\'linux\', \'win32\', or \'darwin\'') .option('-p, --platform <value>', '\'linux\', \'win32\', or \'darwin\'')
.option('-a, --arch <value>', '\'ia32\' or \'x64\'') .option('-a, --arch <value>', '\'ia32\' or \'x64\'')
.option('-e, --electron-version <value>', 'electron version to package, without the \'v\', see https://github.com/atom/electron/releases') .option('-e, --electron-version <value>', 'electron version to package, without the \'v\', see https://github.com/atom/electron/releases')
.option('-o, --overwrite', 'if output directory for a platform already exists, replaces it rather than skipping it, defaults to false') .option('--no-overwrite', 'do not override output directory if it already exists, defaults to false')
.option('-c, --conceal', 'packages the source code within your app into an archive, defaults to false, see http://electron.atom.io/docs/v0.36.0/tutorial/application-packaging/') .option('-c, --conceal', 'packages the source code within your app into an archive, defaults to false, see http://electron.atom.io/docs/v0.36.0/tutorial/application-packaging/')
.option('--counter', 'if the target app should use a persistant counter badge in the dock (OSX only), defaults to false') .option('--counter', 'if the target app should use a persistant counter badge in the dock (OSX only), defaults to false')
.option('-i, --icon <value>', 'the icon file to use as the icon for the app (should be a .icns file on OSX, .png for Windows and Linux)') .option('-i, --icon <value>', 'the icon file to use as the icon for the app (should be a .icns file on OSX, .png for Windows and Linux)')

View File

@ -38,7 +38,7 @@ function optionsFactory(inpOptions, callback) {
version: inpOptions.electronVersion || ELECTRON_VERSION, version: inpOptions.electronVersion || ELECTRON_VERSION,
nativefierVersion: packageJson.version, nativefierVersion: packageJson.version,
out: inpOptions.out || process.cwd(), out: inpOptions.out || process.cwd(),
overwrite: inpOptions.overwrite || false, overwrite: inpOptions.overwrite,
asar: inpOptions.conceal || false, asar: inpOptions.conceal || false,
icon: inpOptions.icon, icon: inpOptions.icon,
counter: inpOptions.counter || false, counter: inpOptions.counter || false,