├── .gitignore
├── LICENSE
├── README.md
├── app
├── Gulpfile.js
├── browser
│ ├── config.js
│ ├── index.html
│ └── scripts
│ │ └── splash
│ │ ├── app.js
│ │ └── controller.js
├── main
│ ├── index.es6.js
│ └── index.js
└── package.json
└── server
├── package.json
└── server.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | jspm_packages
3 | *.swp
4 | .DS_Store
5 | package
6 | dist
7 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Thorsten Hans
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # App Boilerplate for Electron
2 |
3 | This is a fork of the work of Thorsten Hans (original README below), corrected, completed, updated and adapted to my needs.
4 |
5 | ----------------
6 | original README (at time of fork):
7 | ----------------
8 | # Sample App for Electron
9 |
10 | For more details see the post on my blog [http://www.dotnet-rocks.com/2015/05/04/writing-an-electron-atom-shell-app-using-angular-and-es6/](http://www.dotnet-rocks.com/2015/05/04/writing-an-electron-atom-shell-app-using-angular-and-es6/)
11 |
12 |
13 | ## PreConditions for client
14 |
15 | Ensure that the following node packages are installed on your system
16 |
17 | * jspm
18 |
19 | you can install it using `npm i jspm -g`
20 |
21 |
22 | ## Install dependencies
23 |
24 | After cloning the repo execute `npm i` in both subdirectories `app` and `server` to install all dependencies. For the client, `jspm install` will be invoked automatically as `npm postinstall` script!
25 |
26 | ## Creating the Electorn App package
27 |
28 | Execute `gulp` in order to build the electron app.
29 |
30 | The final electron app will be located as a zip file within the `dist` subfolder. Extract the ZIP file and start the electron app.
31 |
32 | ## Demonstrating CrashReporter
33 |
34 | For demonstrating the `crash-reporter` you've to start the little `express` server from the `server` subfolder by invoking `node server.js` before crashing the app using the button...
35 |
--------------------------------------------------------------------------------
/app/Gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp'),
2 | babel = require('gulp-babel'),
3 | runSequence = require('run-sequence'),
4 | rename = require('gulp-rename'),
5 | electron = require('gulp-atom-electron'),
6 | del = require('del');
7 |
8 | gulp.task('transpile:app', function() {
9 | return gulp.src('main/index.es6.js')
10 | .pipe(babel())
11 | .pipe(rename('index.js'))
12 | .pipe(gulp.dest('main'));
13 | });
14 |
15 |
16 | gulp.task('clean', function(){
17 | return del('package', {force: true});
18 | });
19 |
20 | gulp.task('copy:app', ['clean'], function(){
21 | return gulp.src(['main/**/*', 'browser/**/*', 'package.json'], {base: '.'})
22 | .pipe(gulp.dest('package'));
23 | });
24 |
25 |
26 | gulp.task('build', function() {
27 | return gulp.src('package/**')
28 | .pipe(electron({
29 | version: '0.30.3',
30 | // build for OSX
31 | platform: 'darwin' }))
32 | .pipe(electron.zfsdest('dist/es6-ng-electron.zip'));
33 | });
34 |
35 | gulp.task('default', function(){
36 | return runSequence('clean', 'transpile:app', 'copy:app','build');
37 | });
38 |
--------------------------------------------------------------------------------
/app/browser/config.js:
--------------------------------------------------------------------------------
1 | System.config({
2 | baseURL: ".",
3 | defaultJSExtensions: true,
4 | transpiler: "babel",
5 | babelOptions: {
6 | "optional": [
7 | "runtime",
8 | "optimisation.modules.system"
9 | ]
10 | },
11 | paths: {
12 | "github:*": "jspm_packages/github/*",
13 | "npm:*": "jspm_packages/npm/*"
14 | },
15 |
16 | map: {
17 | "angular": "github:angular/bower-angular@1.4.6",
18 | "babel": "npm:babel-core@5.8.25",
19 | "babel-runtime": "npm:babel-runtime@5.8.24",
20 | "core-js": "npm:core-js@1.1.4",
21 | "github:jspm/nodelibs-process@0.1.1": {
22 | "process": "npm:process@0.10.1"
23 | },
24 | "npm:babel-runtime@5.8.24": {
25 | "process": "github:jspm/nodelibs-process@0.1.1"
26 | },
27 | "npm:core-js@1.1.4": {
28 | "fs": "github:jspm/nodelibs-fs@0.1.2",
29 | "process": "github:jspm/nodelibs-process@0.1.1",
30 | "systemjs-json": "github:systemjs/plugin-json@0.1.0"
31 | }
32 | }
33 | });
34 |
--------------------------------------------------------------------------------
/app/browser/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |