2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-01 04:10:49 +00:00
Go to file
2015-05-10 12:22:58 -07:00
downloaded update name 2015-03-22 19:55:15 -07:00
.gitignore gitignore 2015-03-22 19:55:57 -07:00
.travis.yml dont download atom-shell -- use local version instead 2015-04-04 09:47:01 -07:00
cli.js add windows support #3 2015-05-06 12:11:03 -07:00
collaborators.md update collabs 2015-05-06 12:54:12 -07:00
index.js add windows support #3 2015-05-06 12:11:03 -07:00
linux.js Add asar support. Closes GH-2 2015-05-05 21:34:51 -07:00
mac.js Add asar support. Closes GH-2 2015-05-05 21:34:51 -07:00
package.json 3.4.0 2015-05-10 12:22:58 -07:00
readme.md Add asar to readme 2015-05-06 12:48:33 -07:00
windows.js fix javascript standard style issues 2015-05-06 12:19:03 -07:00

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

NPM

Build Status

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 (using require.resolve)
  • Use that version of electron to create a Mac app in cwd called AppName.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 end
  • icon - the icon file to use as the icon for the app
  • app-bundle-id - bundle identifier to use in the app plist
  • app-version - version to set for the app
  • helper-bundle-id - bundle identifier to use in the app helper plist
  • ignore (default none) - do not copy files into App whose filenames regex .match this string
  • prune - runs npm prune --production on the app
  • asar - packages the source code within your app into an archive