2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 02:28:55 +00:00

Merge pull request #48 from jenslind/docs-improvements

Docs improvements
This commit is contained in:
jden 2015-05-27 10:01:15 -07:00
commit dbe467ba78

View File

@ -51,7 +51,60 @@ This will:
You should be able to launch the app on the platform you built for. If not, check your settings and try again. You should be able to launch the app on the platform you built for. If not, check your settings and try again.
**Be careful** not to include node_modules you don't want into your final app. For example, do not include the `node_modules/electron-packager` folder or `node_modules/electron-prebuilt`. You can use `--ignore=node_modules/electron-prebuilt` to ignore of these **Be careful** not to include node_modules you don't want into your final app. `Electron-packager`, `electron-prebuilt` and `.git` will be ignored by default. You can use `--ignore` to ignore files and folders, e.g. `--ignore=node_modules/electron-packager`.
### API
```javascript
var packager = require('electron-packager')
packager(opts, function done (err, appPath) {
})
```
#### packager(opts, callback)
##### opts
**Required**
`dir` - *String*
The source directory.
`name` - *String*
The application name.
`platform` - *String*
Allowed values: *linux, win32, darwin*
`arch` - *String*
Allowed values: *ia32, x64*
`version` - *String*
Semver, see https://github.com/atom/electron/releases
**Optional**
`out` - *String*
`icon` - *String*
`app-bundle-id` - *String*
`app-versionv` - *String*
`helper-bundle-id` - *String*
`ignore` - *String*
`prune` - *Boolean*
`asar` - *Boolean*
`sign` - *String*
##### callback
`err` - *Error*
Contains errors if any.
`appPath` - *String*
Path to the newly created application.
### Building windows apps from non-windows platforms ### Building windows apps from non-windows platforms