mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-04 20:38:03 +00:00
ac3e2903ae
Add asar support. Closes GH-2 |
||
---|---|---|
downloaded | ||
.gitignore | ||
.travis.yml | ||
cli.js | ||
collaborators.md | ||
index.js | ||
linux.js | ||
mac.js | ||
package.json | ||
readme.md |
electron-packager
Build a distributable app from an electron app source code directory. Currently only Mac OS and Linux are implemented but you can send PRs to implement windows :)
formerly known as atom-shell-packager
For an example project using this, check out Monu
installation
# for use in npm scripts
npm i electron-packager --save-dev
# for use from cli
npm i electron-packager -g
# you also need electron installed
npm i electron-prebuilt
usage
$ electron-packager my-app-source-dir AppName
This will:
- Find the closest local version of
electron
installed (usingrequire.resolve
) - Use that version of electron to create a Mac app in
cwd
calledAppName.app
You should be able to double-click AppName.app
to launch the app. 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
options
these are optional CLI options you can pass in
out
(default current working dir) - the dir to put the app into at the endicon
- the icon file to use as the icon for the appapp-bundle-id
- bundle identifier to use in the app plistapp-version
- version to set for the apphelper-bundle-id
- bundle identifier to use in the app helper plistignore
(default none) - do not copy files into App whose filenames regex .match this stringprune
- runsnpm prune --production
on the app