Merge branch '1-0-release'
authorCheng Zhao <zcbenz@gmail.com>
Wed, 11 May 2016 06:14:56 +0000 (15:14 +0900)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 11 May 2016 06:14:56 +0000 (15:14 +0900)
1  2 
default_app/index.html
docs/api/crash-reporter.md
docs/api/synopsis.md
docs/tutorial/application-packaging.md
filenames.gypi
spec/api-app-spec.js

Simple merge
Simple merge
index abce9046d0cece3ccddba9d6f84fbbe9908658c3,fc2ce943932cdb1df0f84736f84bcad37ebeed62..8ed43b04ebf6ec8c8de121f50deeec3ca4bd9bec
@@@ -48,49 -50,17 +48,30 @@@ To run your app, read [Run your app](..
  
  ## Destructuring assignment
  
 -If you are using CoffeeScript or Babel, you can also use
 +As of 0.37, you can use
  [destructuring assignment][destructuring-assignment] to make it easier to use
 -built-in modules:
 +built-in modules.
 +
 +```javascript
 +const {app, BrowserWindow} = require('electron');
 +```
 +
 +If you need the entire `electron` module, you can require it and then using
 +destructuring to access the individual modules from `electron`.
  
  ```javascript
 -const {app, BrowserWindow} = require('electron')
 +const electron = require('electron');
 +const {app, BrowserWindow} = electron;
  ```
  
 -However if you are using plain JavaScript, you have to wait until Chrome fully
 -supports ES6.
 +This is equivalent to the following code:
 +
 +```javascript
 +const electron = require('electron');
 +const app = electron.app;
 +const BrowserWindow = electron.BrowserWindow;
 +```
  
- ## Disable old styles of using built-in modules
- Before v0.35.0, all built-in modules have to be used in the form of
- `require('module-name')`, though it has [many disadvantages][issue-387], we are
- still supporting it for compatibility with old apps.
- To disable the old styles completely, you can set the
- `ELECTRON_HIDE_INTERNAL_MODULES` environment variable:
- ```javascript
- process.env.ELECTRON_HIDE_INTERNAL_MODULES = 'true'
- ```
- Or call the `hideInternalModules` API:
- ```javascript
- require('electron').hideInternalModules();
- ```
  [gui]: https://en.wikipedia.org/wiki/Graphical_user_interface
  [destructuring-assignment]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
  [issue-387]: https://github.com/electron/electron/issues/387
diff --cc filenames.gypi
Simple merge
index 8afa90bb9f96f1b8ecd826df5cdad703b36b8e64,b78700fae9ee1fb96d6bfd0858ebd5a459ad1c92..c0469cc3f68f41e34affc31bab810ceb8d855550
@@@ -7,24 -7,12 +7,13 @@@ const remote = require('electron').remo
  
  const app = remote.require('electron').app
  const BrowserWindow = remote.require('electron').BrowserWindow
 +const isCI = remote.getGlobal('isCi')
  
  describe('electron module', function () {
-   it('allows old style require by default', function () {
-     require('shell')
-   })
-   it('can prevent exposing internal modules to require', function (done) {
-     const electron = require('electron')
-     const clipboard = require('clipboard')
-     assert.equal(typeof clipboard, 'object')
-     electron.hideInternalModules()
-     try {
+   it('does not expose internal modules to require', function () {
+     assert.throws(function () {
        require('clipboard')
-     } catch (err) {
-       assert.equal(err.message, "Cannot find module 'clipboard'")
-       done()
-     }
+     }, /Cannot find module 'clipboard'/)
    })
  })