Merge pull request #9724 from electron/bump-standard-markdown

Bump standard-markdown
This commit is contained in:
Zeke Sikelianos 2017-06-14 17:26:53 -07:00 committed by GitHub
commit 7587fc22f1
9 changed files with 6 additions and 9 deletions

View file

@ -134,7 +134,7 @@ Windowsでは、ファイルパスを取得するために、 `process.argv` を
`url``certificate` 検証に失敗したときに発生します。証明書を信頼するために`event.preventDefault()``callback(true)`をコールして既定の動作を止める必要があります。
```javascript
session.on('certificate-error', function (event, webContents, url, error, certificate, callback) {
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
if (url === 'https://github.com') {
// Verification logic.
event.preventDefault()

View file

@ -76,7 +76,7 @@ app.on('ready', function () {
```javascript
protocol.registerBufferProtocol('atom', function (request, callback) {
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
}, function (error) {
if (error) console.error('Failed to register protocol')
})

View file

@ -20,7 +20,6 @@ app.on('ready', function () {
appIcon.setToolTip('This is my application.')
appIcon.setContextMenu(contextMenu)
})
```
__プラットフォームの制限:__

View file

@ -130,7 +130,7 @@ app.on('ready', () => {
const {protocol} = require('electron')
protocol.registerBufferProtocol('atom', (request, callback) => {
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
}, (error) => {
if (error) console.error('Failed to register protocol')
})

View file

@ -131,7 +131,6 @@ app.on('activate', function () {
// В этот файл Вы можете включить остальной код вашего главного процесса.
// Вы также можете разложить его по отдельным файлам и подключить с помощью require.
```
Наконец, `index.html`, страница, которую Вы хотите показать:

View file

@ -141,7 +141,6 @@ app.on('activate', () => {
// Bu sayfada, uygulamanızın spesifik main process kodlarını dahil edebilirsiniz.
// Aynı zamanda bu kodları ayrı dosyalar halinde oluştura bilir
// ve buraya require yoluyla ekleye bilirsiniz.
```
Son olarak `index.html` yani göstermek istediğiniz web sayfası:

View file

@ -124,7 +124,7 @@ app.on('ready', () => {
const {protocol} = require('electron')
protocol.registerBufferProtocol('atom', (request, callback) => {
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
}, (error) => {
if (error) console.error('Failed to register protocol')
})

View file

@ -137,7 +137,7 @@ Example:
const {protocol} = require('electron')
protocol.registerBufferProtocol('atom', (request, callback) => {
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
}, (error) => {
if (error) console.error('Failed to register protocol')
})

View file

@ -9,7 +9,7 @@
"electron-typescript-definitions": "^1.2.7",
"request": "^2.68.0",
"standard": "^8.4.0",
"standard-markdown": "^2.1.1"
"standard-markdown": "^4.0.0"
},
"standard": {
"ignore": [