From eeb91ef31e20c6e7ba934f28451ba50114851e71 Mon Sep 17 00:00:00 2001 From: Jens Lind Date: Wed, 27 May 2015 18:46:17 +0200 Subject: [PATCH 1/3] Changed --ignore part in readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 2ec9b42..18c967c 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,7 @@ This will: 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 (`--ignore=node_modules/electron-packager`). ### Building windows apps from non-windows platforms From 199283f2515a62b0051a983557a7c7c3d47c0dc1 Mon Sep 17 00:00:00 2001 From: Jens Lind Date: Wed, 27 May 2015 18:46:42 +0200 Subject: [PATCH 2/3] Added API section to readme --- readme.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/readme.md b/readme.md index 18c967c..e45bc11 100644 --- a/readme.md +++ b/readme.md @@ -53,6 +53,59 @@ You should be able to launch the app on the platform you built for. If not, chec **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 (`--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 If you run this on windows and you want to set the icon for your app using the `--icon` option, it requires running a thing called `rcedit.exe` (via [this](https://github.com/atom/node-rcedit)), which means you will need to install `wine` and have it available in your path. To do this on Mac OS you can `brew install wine`. From aed7968aed39e94b996beb3c4317d58f71f4d69a Mon Sep 17 00:00:00 2001 From: Jens Lind Date: Wed, 27 May 2015 18:50:47 +0200 Subject: [PATCH 3/3] Fixed typos --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index e45bc11..93b2152 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,7 @@ This will: 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. `Electron-packager`, `electron-prebuilt` and `.git` will be ignored by default. You can use `--ignore` to ignore files and folders (`--ignore=node_modules/electron-packager`). +**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 @@ -79,7 +79,7 @@ Allowed values: *ia32, x64* `version` - *String* Semver, see https://github.com/atom/electron/releases -** Optional ** +**Optional** `out` - *String* `icon` - *String*