Merge pull request #44 from electron/updates

Make updates
This commit is contained in:
Zeke Sikelianos 2016-04-28 17:40:05 -07:00
commit 732b807193
5 changed files with 16 additions and 5 deletions

View File

@ -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).

View File

@ -6,8 +6,14 @@
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using node <script>document.write(process.versions.node)</script>,
Chromium <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
</body>
<script>
// You can also require other files to run in this process
require('./renderer.js')
</script>
</html>

View File

@ -1,5 +1,3 @@
'use strict';
const electron = require('electron');
// Module to control application life.
const app = electron.app;
@ -31,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.
@ -49,3 +48,6 @@ app.on('activate', function () {
createWindow();
}
});
// 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.

View File

@ -23,6 +23,6 @@
},
"homepage": "https://github.com/electron/electron-quick-start#readme",
"devDependencies": {
"electron-prebuilt": "^0.37.0"
"electron-prebuilt": "^0.37.7"
}
}

3
renderer.js Normal file
View File

@ -0,0 +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.