From e0192879df639615b032381aa56c9a19e158ba4f Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 20 Apr 2016 15:06:21 -0700 Subject: [PATCH 1/9] Do not need 'use strict' --- main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.js b/main.js index a9b3175..ee2bd7a 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,3 @@ -'use strict'; - const electron = require('electron'); // Module to control application life. const app = electron.app; From 77abe0dd3a1ae563b2c2e3a6db8fd53929672eb7 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 20 Apr 2016 15:13:58 -0700 Subject: [PATCH 2/9] Note availability of Node APIs --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 1554374..0d5a14d 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@

Hello World!

+ We are using node , Chromium , and Electron . From 1e287bdb624bb1a62362316994c226ba7d26f6a9 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 20 Apr 2016 15:14:19 -0700 Subject: [PATCH 3/9] Add example and notes on using require in renderer process --- index.html | 5 +++++ renderer.js | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 renderer.js diff --git a/index.html b/index.html index 0d5a14d..63a952c 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,9 @@ Chromium , and Electron . + + diff --git a/renderer.js b/renderer.js new file mode 100644 index 0000000..c7b03aa --- /dev/null +++ b/renderer.js @@ -0,0 +1,2 @@ +// This file is required by the index.html file and will +// be executed in the renderer process for that window. From ae4e0afaaf1077a7718e34ef9c3f4f95d4b9643c Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 20 Apr 2016 15:14:27 -0700 Subject: [PATCH 4/9] Add a comments --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index ee2bd7a..d72c90b 100644 --- a/main.js +++ b/main.js @@ -29,6 +29,7 @@ function createWindow () { // This method will be called when Electron has finished // initialization and is ready to create browser windows. +// Some APIs can only be used after this event occurs. app.on('ready', createWindow); // Quit when all windows are closed. @@ -47,3 +48,6 @@ app.on('activate', function () { createWindow(); } }); + +// In this file you can include the rest of your app specific main process +// code. You can also put them in files and require them here. From f3078065eb2bbc437b9a0c7a3158e9205f3010f4 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 20 Apr 2016 15:18:14 -0700 Subject: [PATCH 5/9] A few tweaks to readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 022b42a..c2e3e72 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ This is a minimal Electron application based on the [Quick Start Guide](http://e A basic Electron application needs just these files: -- `index.html` - A web page to render. -- `main.js` - Starts the app and creates a browser window to render HTML. - `package.json` - Points to the app's main file and lists its details and dependencies. +- `main.js` - Starts the app and creates a browser window to render HTML. This is the app's **main process**. +- `index.html` - A web page to render. This is the app's **renderer process**. You can learn more about each of these components within the [Quick Start Guide](http://electron.atom.io/docs/latest/tutorial/quick-start). From df6263172b43b8a47fcd90ccff8fe42b679ce9fa Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Thu, 28 Apr 2016 17:18:15 -0700 Subject: [PATCH 6/9] Fix path --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 63a952c..7bbf746 100644 --- a/index.html +++ b/index.html @@ -14,6 +14,6 @@ From b5a73e2e089215b44741cc0f924231b66c2480ca Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Thu, 28 Apr 2016 17:18:32 -0700 Subject: [PATCH 7/9] Add comment --- renderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/renderer.js b/renderer.js index c7b03aa..901d75e 100644 --- a/renderer.js +++ b/renderer.js @@ -1,2 +1,3 @@ // This file is required by the index.html file and will // be executed in the renderer process for that window. +// All of the Node.js APIs are available in this process. From e1fba0fb557451d8733a2a6744cfea398105d774 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Thu, 28 Apr 2016 17:19:16 -0700 Subject: [PATCH 8/9] Use newer Electron --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b81ae5f..495e48e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ }, "homepage": "https://github.com/electron/electron-quick-start#readme", "devDependencies": { - "electron-prebuilt": "^0.37.0" + "electron-prebuilt": "^0.37.7" } } From f7dae7a3289adede97e5ec7b1d23ddab4604a208 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Thu, 28 Apr 2016 17:32:24 -0700 Subject: [PATCH 9/9] Copy edits per inline comments --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index d72c90b..b230ec4 100644 --- a/main.js +++ b/main.js @@ -49,5 +49,5 @@ app.on('activate', function () { } }); -// In this file you can include the rest of your app specific main process -// code. You can also put them in files and require them here. +// In this file you can include the rest of your app's specific main process +// code. You can also put them in separate files and require them here.