Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added packaging capability #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
node_modules

# WebStorm Project File
.idea

# Electron-Packager Output
packaged

# MacOS Folder DB
.DS_Store
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ npm install
npm start
```

## Packaging

```bash
# after installation has completed
npm package
```

[ES6]: http://exploringjs.com/
[React]: https://facebook.github.io/react/
[Electron]: http://electron.atom.io/
Expand Down
Binary file added assets/mac/icon.icns
Binary file not shown.
Binary file added assets/win/icon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script>
// install babel hooks in the renderer process
require('babel-register');
require('./scripts/main');
require('./scripts/main.js');
</script>
</body>
</html>
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "electron-es6-react",
"version": "0.1.0",
"main": "main.js",
"main": "start.js",
"license": "MIT",
"repository": "b52/electron-es6-react",
"description": "This is a basic Electron ES6 React template",
"scripts": {
"start": "electron -r babel-register ."
"start": "electron -r babel-register .",
"package": "electron-packager . --icon=assets/mac/icon.icns --overwrite --out=packaged --prune=true",
"postinstall": "electron-builder install-app-deps"
},
"dependencies": {
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-register": "^6.3.13",
"electron-packager": "^11.0.1",
"react": "^15.3.2",
"react-dom": "^15.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import Main from '../views/main.jsx';

window.onload = function(){
ReactDOM.render(<Main />, document.getElementById('app'));
}
};
5 changes: 5 additions & 0 deletions start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint strict: 0 */
'use strict';

require('babel-register');
require('./main.js');