Skip to content

Commit 0379d21

Browse files
devhammerniieani
authored andcommitted
doc(readme): include packaging instructions using electron-packager (aurelia#693)
* Update README.md to add packaging instructions Include packaging instructions using electron-packager. Add Note that "main" in package.json needs to be changed to 'index.js' for packaging to succeed. NOTE: this README.md update should also be applied to the skeleton-esnext README, since both appear to have the same instructions for running within Electron. * Update README.md to add packaging instructions Include packaging instructions using electron-packager. Add Note that "main" in package.json needs to be changed to 'index.js' for packaging to succeed.
1 parent c011c1e commit 0379d21

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

skeleton-esnext/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ To run the app under [Electron](http://electron.atom.io), follow these steps.
103103
electron .
104104
```
105105

106+
## Packaging The App Using Electron-Packager
107+
108+
>**Note:** The electron-packager package relies on `"main"` in package.json to know which JS file to use to start the application. To make this work with electron-packager change this line in package.json from `"main": "dist/main.js",` to `"main": "index.js",`
109+
110+
1. Follow steps 1-6 in the previous section (Running The App under Electron).
111+
112+
2. Install electron-packager
113+
114+
```shell
115+
npm install electron-packager -g
116+
```
117+
118+
3. Run the command:
119+
120+
```shell
121+
electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> --version <electron version #> [optional flags...]
122+
```
123+
Include the `--asar` option to create an [asar archive](http://electron.atom.io/docs/tutorial/application-packaging/) from your app.
124+
125+
By default, electron-packager will place the packaged app in a folder under the source folder with the naming convention of `<appname>-<platform>-<arch>`.
126+
127+
See the [electron-packager](https://github.com/electron-userland/electron-packager) readme for more details on options.
128+
106129

107130
## Bundling
108131
Bundling is performed by [Aurelia Bundler](http://github.com/aurelia/bundler). A gulp task is already configured for that. Use the following command to bundle the app:

skeleton-typescript/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ To run the app under [Electron](http://electron.atom.io), follow these steps.
103103
electron .
104104
```
105105

106+
## Packaging The App Using Electron-Packager
107+
108+
>**Note:** The electron-packager package relies on `"main"` in package.json to know which JS file to use to start the application. To make this work with electron-packager change this line in package.json from `"main": "dist/main.js",` to `"main": "index.js",`
109+
110+
1. Follow steps 1-6 in the previous section (Running The App under Electron).
111+
112+
2. Install electron-packager
113+
114+
```shell
115+
npm install electron-packager -g
116+
```
117+
118+
3. Run the command:
119+
120+
```shell
121+
electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> --version <electron version #> [optional flags...]
122+
```
123+
Include the `--asar` option to create an [asar archive](http://electron.atom.io/docs/tutorial/application-packaging/) from your app.
124+
125+
By default, electron-packager will place the packaged app in a folder under the source folder with the naming convention of `<appname>-<platform>-<arch>`.
126+
127+
See the [electron-packager](https://github.com/electron-userland/electron-packager) readme for more details on options.
128+
106129

107130
## Bundling
108131
Bundling is performed by [Aurelia Bundler](http://github.com/aurelia/bundler). A gulp task is already configured for that. Use the following command to bundle the app:

0 commit comments

Comments
 (0)