chore: fix lint:js-in-markdown script (#38260)

This commit is contained in:
David Sanders 2023-05-15 00:58:35 -07:00 committed by GitHub
parent 0149ae72e6
commit eeb1e7d499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1078 additions and 586 deletions

View file

@ -1346,7 +1346,7 @@ app.setLoginItemSettings({
path: updateExe, path: updateExe,
args: [ args: [
'--processStart', `"${exeName}"`, '--processStart', `"${exeName}"`,
'--process-start-args', `"--hidden"` '--process-start-args', '"--hidden"'
] ]
}) })
``` ```

View file

@ -65,7 +65,7 @@ strictly follow the Node.js model as described in the
For instance, we could have created the same request to 'github.com' as follows: For instance, we could have created the same request to 'github.com' as follows:
```JavaScript ```javascript
const request = net.request({ const request = net.request({
method: 'GET', method: 'GET',
protocol: 'https:', protocol: 'https:',
@ -104,7 +104,7 @@ The `callback` function is expected to be called back with user credentials:
* `username` string * `username` string
* `password` string * `password` string
```JavaScript ```javascript
request.on('login', (authInfo, callback) => { request.on('login', (authInfo, callback) => {
callback('username', 'password') callback('username', 'password')
}) })
@ -113,9 +113,9 @@ request.on('login', (authInfo, callback) => {
Providing empty credentials will cancel the request and report an authentication Providing empty credentials will cancel the request and report an authentication
error on the response object: error on the response object:
```JavaScript ```javascript
request.on('response', (response) => { request.on('response', (response) => {
console.log(`STATUS: ${response.statusCode}`); console.log(`STATUS: ${response.statusCode}`)
response.on('error', (error) => { response.on('error', (error) => {
console.log(`ERROR: ${JSON.stringify(error)}`) console.log(`ERROR: ${JSON.stringify(error)}`)
}) })

View file

@ -154,7 +154,8 @@ const isMac = process.platform === 'darwin'
const template = [ const template = [
// { role: 'appMenu' } // { role: 'appMenu' }
...(isMac ? [{ ...(isMac
? [{
label: app.name, label: app.name,
submenu: [ submenu: [
{ role: 'about' }, { role: 'about' },
@ -167,7 +168,8 @@ const template = [
{ type: 'separator' }, { type: 'separator' },
{ role: 'quit' } { role: 'quit' }
] ]
}] : []), }]
: []),
// { role: 'fileMenu' } // { role: 'fileMenu' }
{ {
label: 'File', label: 'File',
@ -185,7 +187,8 @@ const template = [
{ role: 'cut' }, { role: 'cut' },
{ role: 'copy' }, { role: 'copy' },
{ role: 'paste' }, { role: 'paste' },
...(isMac ? [ ...(isMac
? [
{ role: 'pasteAndMatchStyle' }, { role: 'pasteAndMatchStyle' },
{ role: 'delete' }, { role: 'delete' },
{ role: 'selectAll' }, { role: 'selectAll' },
@ -197,7 +200,8 @@ const template = [
{ role: 'stopSpeaking' } { role: 'stopSpeaking' }
] ]
} }
] : [ ]
: [
{ role: 'delete' }, { role: 'delete' },
{ type: 'separator' }, { type: 'separator' },
{ role: 'selectAll' } { role: 'selectAll' }
@ -225,12 +229,14 @@ const template = [
submenu: [ submenu: [
{ role: 'minimize' }, { role: 'minimize' },
{ role: 'zoom' }, { role: 'zoom' },
...(isMac ? [ ...(isMac
? [
{ type: 'separator' }, { type: 'separator' },
{ role: 'front' }, { role: 'front' },
{ type: 'separator' }, { type: 'separator' },
{ role: 'window' } { role: 'window' }
] : [ ]
: [
{ role: 'close' } { role: 'close' }
]) ])
] ]

View file

@ -1481,7 +1481,7 @@ app.whenReady().then(() => {
const protocol = session.fromPartition('some-partition').protocol const protocol = session.fromPartition('some-partition').protocol
if (!protocol.registerFileProtocol('atom', (request, callback) => { if (!protocol.registerFileProtocol('atom', (request, callback) => {
const url = request.url.substr(7) const url = request.url.substr(7)
callback({ path: path.normalize(`${__dirname}/${url}`) }) callback({ path: path.normalize(path.join(__dirname, url)) })
})) { })) {
console.error('Failed to register protocol') console.error('Failed to register protocol')
} }

View file

@ -228,10 +228,10 @@ const win = new BrowserWindow(browserOptions)
// Navigate. // Navigate.
if (browserOptions.transparent) { if (browserOptions.transparent) {
win.loadURL(`file://${__dirname}/index.html`) win.loadFile('index.html')
} else { } else {
// No transparency, so we load a fallback that uses basic styles. // No transparency, so we load a fallback that uses basic styles.
win.loadURL(`file://${__dirname}/fallback.html`) win.loadFile('fallback.html')
} }
``` ```

View file

@ -23,7 +23,7 @@ function createWindow () {
if (portList && portList.length > 0) { if (portList && portList.length > 0) {
callback(portList[0].portId) callback(portList[0].portId)
} else { } else {
// eslint-disable-next-line standard/no-callback-literal // eslint-disable-next-line n/no-callback-literal
callback('') // Could not find any matching devices callback('') // Could not find any matching devices
} }
}) })

View file

@ -24,9 +24,7 @@ function createWindow () {
event.preventDefault() event.preventDefault()
if (details.deviceList && details.deviceList.length > 0) { if (details.deviceList && details.deviceList.length > 0) {
const deviceToReturn = details.deviceList.find((device) => { const deviceToReturn = details.deviceList.find((device) => {
if (!grantedDeviceThroughPermHandler || (device.deviceId !== grantedDeviceThroughPermHandler.deviceId)) { return !grantedDeviceThroughPermHandler || (device.deviceId !== grantedDeviceThroughPermHandler.deviceId)
return true
}
}) })
if (deviceToReturn) { if (deviceToReturn) {
callback(deviceToReturn.deviceId) callback(deviceToReturn.deviceId)

View file

@ -3,9 +3,7 @@ const path = require('path')
async function handleFileOpen () { async function handleFileOpen () {
const { canceled, filePaths } = await dialog.showOpenDialog() const { canceled, filePaths } = await dialog.showOpenDialog()
if (canceled) { if (!canceled) {
} else {
return filePaths[0] return filePaths[0]
} }
} }

View file

@ -37,7 +37,7 @@ This installs all necessary packages for you and generates a `wdio.conf.js` conf
Update the capabilities in your configuration file to point to your Electron app binary: Update the capabilities in your configuration file to point to your Electron app binary:
```javascript title='wdio.conf.js' ```javascript title='wdio.conf.js'
export.config = { exports.config = {
// ... // ...
capabilities: [{ capabilities: [{
browserName: 'chrome', browserName: 'chrome',
@ -214,10 +214,10 @@ test('example test', async () => {
const isPackaged = await electronApp.evaluate(async ({ app }) => { const isPackaged = await electronApp.evaluate(async ({ app }) => {
// This runs in Electron's main process, parameter here is always // This runs in Electron's main process, parameter here is always
// the result of the require('electron') in the main app script. // the result of the require('electron') in the main app script.
return app.isPackaged; return app.isPackaged
}); })
expect(isPackaged).toBe(false); expect(isPackaged).toBe(false)
// Wait for the first BrowserWindow to open // Wait for the first BrowserWindow to open
// and return its Page object // and return its Page object
@ -226,7 +226,7 @@ test('example test', async () => {
// close app // close app
await electronApp.close() await electronApp.close()
}); })
``` ```
Then, run Playwright Test using `npx playwright test`. You should see the test pass in your Then, run Playwright Test using `npx playwright test`. You should see the test pass in your
@ -338,7 +338,7 @@ class TestDriver {
} }
} }
module.exports = { TestDriver }; module.exports = { TestDriver }
``` ```
In your app code, can then write a simple handler to receive RPC calls: In your app code, can then write a simple handler to receive RPC calls:

View file

@ -127,7 +127,7 @@ try {
authors: 'My App Inc.', authors: 'My App Inc.',
exe: 'myapp.exe', exe: 'myapp.exe',
certificateFile: './cert.pfx', certificateFile: './cert.pfx',
certificatePassword: 'this-is-a-secret', certificatePassword: 'this-is-a-secret'
}) })
console.log('It worked!') console.log('It worked!')
} catch (e) { } catch (e) {
@ -159,7 +159,7 @@ const msiCreator = new MSICreator({
version: '1.1.2', version: '1.1.2',
outputDirectory: '/path/to/output/folder', outputDirectory: '/path/to/output/folder',
certificateFile: './cert.pfx', certificateFile: './cert.pfx',
certificatePassword: 'this-is-a-secret', certificatePassword: 'this-is-a-secret'
}) })
// Step 2: Create a .wxs template file // Step 2: Create a .wxs template file

View file

@ -74,7 +74,7 @@ function createWindow () {
app.whenReady().then(() => { app.whenReady().then(() => {
ipcMain.on('set-title', handleSetTitle) ipcMain.on('set-title', handleSetTitle)
createWindow() createWindow()
} })
// ... // ...
``` ```
@ -144,7 +144,7 @@ const titleInput = document.getElementById('title')
setButton.addEventListener('click', () => { setButton.addEventListener('click', () => {
const title = titleInput.value const title = titleInput.value
window.electronAPI.setTitle(title) window.electronAPI.setTitle(title)
}); })
``` ```
At this point, your demo should be fully functional. Try using the input field and see what happens At this point, your demo should be fully functional. Try using the input field and see what happens
@ -189,9 +189,7 @@ const path = require('path')
async function handleFileOpen () { async function handleFileOpen () {
const { canceled, filePaths } = await dialog.showOpenDialog() const { canceled, filePaths } = await dialog.showOpenDialog()
if (canceled) { if (!canceled) {
return
} else {
return filePaths[0] return filePaths[0]
} }
} }
@ -395,11 +393,11 @@ function createWindow () {
submenu: [ submenu: [
{ {
click: () => mainWindow.webContents.send('update-counter', 1), click: () => mainWindow.webContents.send('update-counter', 1),
label: 'Increment', label: 'Increment'
}, },
{ {
click: () => mainWindow.webContents.send('update-counter', -1), click: () => mainWindow.webContents.send('update-counter', -1),
label: 'Decrement', label: 'Decrement'
} }
] ]
} }
@ -409,7 +407,6 @@ function createWindow () {
mainWindow.loadFile('index.html') mainWindow.loadFile('index.html')
} }
// ... // ...
``` ```
For the purposes of the tutorial, it's important to note that the `click` handler For the purposes of the tutorial, it's important to note that the `click` handler

View file

@ -84,11 +84,11 @@ renderer process using the [addEventListener() API][addEventListener-api].
```javascript fiddle='docs/fiddles/features/keyboard-shortcuts/web-apis|focus=renderer.js' ```javascript fiddle='docs/fiddles/features/keyboard-shortcuts/web-apis|focus=renderer.js'
const handleKeyPress = (event) => { const handleKeyPress = (event) => {
// You can put code here to handle the keypress. // You can put code here to handle the keypress.
document.getElementById("last-keypress").innerText = event.key; document.getElementById('last-keypress').innerText = event.key
console.log(`You pressed ${event.key}`); console.log(`You pressed ${event.key}`)
} }
window.addEventListener('keyup', handleKeyPress, true); window.addEventListener('keyup', handleKeyPress, true)
``` ```
> Note: the third parameter `true` indicates that the listener will always receive > Note: the third parameter `true` indicates that the listener will always receive

View file

@ -29,7 +29,7 @@ const { app, BrowserWindow, Menu } = require('electron')
const createWindow = () => { const createWindow = () => {
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 800, width: 800,
height: 600, height: 600
}) })
win.loadFile('index.html') win.loadFile('index.html')
@ -66,7 +66,6 @@ app.on('activate', () => {
createWindow() createWindow()
} }
}) })
``` ```
After launching the Electron application, right click the application icon. After launching the Electron application, right click the application icon.

View file

@ -17,29 +17,29 @@ Notification objects created using this module do not appear unless their `show(
method is called. method is called.
```js title='Main Process' ```js title='Main Process'
const { Notification } = require("electron"); const { Notification } = require('electron')
const NOTIFICATION_TITLE = "Basic Notification"; const NOTIFICATION_TITLE = 'Basic Notification'
const NOTIFICATION_BODY = "Notification from the Main process"; const NOTIFICATION_BODY = 'Notification from the Main process'
new Notification({ new Notification({
title: NOTIFICATION_TITLE, title: NOTIFICATION_TITLE,
body: NOTIFICATION_BODY, body: NOTIFICATION_BODY
}).show(); }).show()
``` ```
Here's a full example that you can open with Electron Fiddle: Here's a full example that you can open with Electron Fiddle:
```javascript fiddle='docs/fiddles/features/notifications/main' ```javascript fiddle='docs/fiddles/features/notifications/main'
const { Notification } = require("electron"); const { Notification } = require('electron')
const NOTIFICATION_TITLE = "Basic Notification"; const NOTIFICATION_TITLE = 'Basic Notification'
const NOTIFICATION_BODY = "Notification from the Main process"; const NOTIFICATION_BODY = 'Notification from the Main process'
new Notification({ new Notification({
title: NOTIFICATION_TITLE, title: NOTIFICATION_TITLE,
body: NOTIFICATION_BODY, body: NOTIFICATION_BODY
}).show(); }).show()
``` ```
### Show notifications in the renderer process ### Show notifications in the renderer process
@ -48,25 +48,25 @@ Notifications can be displayed directly from the renderer process with the
[web Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API). [web Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API).
```js title='Renderer Process' ```js title='Renderer Process'
const NOTIFICATION_TITLE = "Title"; const NOTIFICATION_TITLE = 'Title'
const NOTIFICATION_BODY = const NOTIFICATION_BODY =
"Notification from the Renderer process. Click to log to console."; 'Notification from the Renderer process. Click to log to console.'
const CLICK_MESSAGE = "Notification clicked"; const CLICK_MESSAGE = 'Notification clicked'
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY }).onclick = new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY }).onclick =
() => console.log(CLICK_MESSAGE); () => console.log(CLICK_MESSAGE)
``` ```
Here's a full example that you can open with Electron Fiddle: Here's a full example that you can open with Electron Fiddle:
```javascript fiddle='docs/fiddles/features/notifications/renderer' ```javascript fiddle='docs/fiddles/features/notifications/renderer'
const NOTIFICATION_TITLE = "Title"; const NOTIFICATION_TITLE = 'Title'
const NOTIFICATION_BODY = const NOTIFICATION_BODY =
"Notification from the Renderer process. Click to log to console."; 'Notification from the Renderer process. Click to log to console.'
const CLICK_MESSAGE = "Notification clicked"; const CLICK_MESSAGE = 'Notification clicked'
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY }).onclick = new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY }).onclick =
() => console.log(CLICK_MESSAGE); () => console.log(CLICK_MESSAGE)
``` ```
## Platform considerations ## Platform considerations

View file

@ -161,8 +161,8 @@ const { BrowserWindow } = require('electron')
// ... // ...
const win = new BrowserWindow({ const win = new BrowserWindow({
webPreferences: { webPreferences: {
preload: 'path/to/preload.js', preload: 'path/to/preload.js'
}, }
}) })
// ... // ...
``` ```
@ -177,7 +177,7 @@ the [`contextIsolation`][context-isolation] default.
```js title='preload.js' ```js title='preload.js'
window.myAPI = { window.myAPI = {
desktop: true, desktop: true
} }
``` ```
@ -196,7 +196,7 @@ securely:
const { contextBridge } = require('electron') const { contextBridge } = require('electron')
contextBridge.exposeInMainWorld('myAPI', { contextBridge.exposeInMainWorld('myAPI', {
desktop: true, desktop: true
}) })
``` ```

View file

@ -29,7 +29,7 @@ To set the represented file of window, you can use the
```javascript fiddle='docs/fiddles/features/represented-file' ```javascript fiddle='docs/fiddles/features/represented-file'
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const os = require('os'); const os = require('os')
const createWindow = () => { const createWindow = () => {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -742,19 +742,19 @@ You should be validating the `sender` of **all** IPC messages by default.
```js title='main.js (Main Process)' ```js title='main.js (Main Process)'
// Bad // Bad
ipcMain.handle('get-secrets', () => { ipcMain.handle('get-secrets', () => {
return getSecrets(); return getSecrets()
}); })
// Good // Good
ipcMain.handle('get-secrets', (e) => { ipcMain.handle('get-secrets', (e) => {
if (!validateSender(e.senderFrame)) return null; if (!validateSender(e.senderFrame)) return null
return getSecrets(); return getSecrets()
}); })
function validateSender (frame) { function validateSender (frame) {
// Value the host of the URL using an actual URL parser and an allowlist // Value the host of the URL using an actual URL parser and an allowlist
if ((new URL(frame.url)).host === 'electronjs.org') return true; if ((new URL(frame.url)).host === 'electronjs.org') return true
return false; return false
} }
``` ```

View file

@ -125,7 +125,7 @@ main process entry point is configured correctly. Create a `main.js` file in the
of your project with a single line of code: of your project with a single line of code:
```js title='main.js' ```js title='main.js'
console.log(`Hello from Electron 👋`) console.log('Hello from Electron 👋')
``` ```
Because Electron's main process is a Node.js runtime, you can execute arbitrary Node.js code Because Electron's main process is a Node.js runtime, you can execute arbitrary Node.js code
@ -199,7 +199,7 @@ const { app, BrowserWindow } = require('electron')
const createWindow = () => { const createWindow = () => {
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 800, width: 800,
height: 600, height: 600
}) })
win.loadFile('index.html') win.loadFile('index.html')
@ -247,7 +247,7 @@ The `createWindow()` function loads your web page into a new BrowserWindow insta
const createWindow = () => { const createWindow = () => {
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 800, width: 800,
height: 600, height: 600
}) })
win.loadFile('index.html') win.loadFile('index.html')

View file

@ -73,7 +73,7 @@ const { contextBridge } = require('electron')
contextBridge.exposeInMainWorld('versions', { contextBridge.exposeInMainWorld('versions', {
node: () => process.versions.node, node: () => process.versions.node,
chrome: () => process.versions.chrome, chrome: () => process.versions.chrome,
electron: () => process.versions.electron, electron: () => process.versions.electron
// we can also expose variables, not just functions // we can also expose variables, not just functions
}) })
``` ```
@ -90,8 +90,8 @@ const createWindow = () => {
width: 800, width: 800,
height: 600, height: 600,
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js'), preload: path.join(__dirname, 'preload.js')
}, }
}) })
win.loadFile('index.html') win.loadFile('index.html')
@ -183,7 +183,7 @@ contextBridge.exposeInMainWorld('versions', {
node: () => process.versions.node, node: () => process.versions.node,
chrome: () => process.versions.chrome, chrome: () => process.versions.chrome,
electron: () => process.versions.electron, electron: () => process.versions.electron,
ping: () => ipcRenderer.invoke('ping'), ping: () => ipcRenderer.invoke('ping')
// we can also expose variables, not just functions // we can also expose variables, not just functions
}) })
``` ```
@ -211,8 +211,8 @@ const createWindow = () => {
width: 800, width: 800,
height: 600, height: 600,
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js'), preload: path.join(__dirname, 'preload.js')
}, }
}) })
win.loadFile('index.html') win.loadFile('index.html')
} }

View file

@ -158,7 +158,7 @@ module.exports = {
tool: 'notarytool', tool: 'notarytool',
appleId: process.env.APPLE_ID, appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD, appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID, teamId: process.env.APPLE_TEAM_ID
} }
// ... // ...
} }
@ -176,10 +176,10 @@ module.exports = {
name: '@electron-forge/maker-squirrel', name: '@electron-forge/maker-squirrel',
config: { config: {
certificateFile: './cert.pfx', certificateFile: './cert.pfx',
certificatePassword: process.env.CERTIFICATE_PASSWORD, certificatePassword: process.env.CERTIFICATE_PASSWORD
}, }
}, }
], ]
// ... // ...
} }
``` ```

View file

@ -86,13 +86,13 @@ module.exports = {
config: { config: {
repository: { repository: {
owner: 'github-user-name', owner: 'github-user-name',
name: 'github-repo-name', name: 'github-repo-name'
}, },
prerelease: false, prerelease: false,
draft: true, draft: true
}, }
}, }
], ]
} }
``` ```

View file

@ -121,7 +121,7 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
title: 'Application Update', title: 'Application Update',
message: process.platform === 'win32' ? releaseNotes : releaseName, message: process.platform === 'win32' ? releaseNotes : releaseName,
detail: detail:
'A new version has been downloaded. Restart the application to apply the updates.', 'A new version has been downloaded. Restart the application to apply the updates.'
} }
dialog.showMessageBox(dialogOpts).then((returnValue) => { dialog.showMessageBox(dialogOpts).then((returnValue) => {

View file

@ -9,7 +9,7 @@
"@electron/docs-parser": "^1.1.0", "@electron/docs-parser": "^1.1.0",
"@electron/fiddle-core": "^1.0.4", "@electron/fiddle-core": "^1.0.4",
"@electron/github-app-auth": "^1.5.0", "@electron/github-app-auth": "^1.5.0",
"@electron/lint-roller": "^1.1.0", "@electron/lint-roller": "^1.2.1",
"@electron/typescript-definitions": "^8.14.0", "@electron/typescript-definitions": "^8.14.0",
"@octokit/rest": "^19.0.7", "@octokit/rest": "^19.0.7",
"@primer/octicons": "^10.0.0", "@primer/octicons": "^10.0.0",
@ -44,6 +44,7 @@
"eslint-plugin-import": "^2.22.0", "eslint-plugin-import": "^2.22.0",
"eslint-plugin-mocha": "^7.0.1", "eslint-plugin-mocha": "^7.0.1",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.1",
"eslint-plugin-typescript": "^0.14.0", "eslint-plugin-typescript": "^0.14.0",
"events": "^3.2.0", "events": "^3.2.0",
@ -64,7 +65,6 @@
"remark-preset-lint-markdown-style-guide": "^4.0.0", "remark-preset-lint-markdown-style-guide": "^4.0.0",
"semver": "^5.6.0", "semver": "^5.6.0",
"shx": "^0.3.2", "shx": "^0.3.2",
"standard-markdown": "^6.0.0",
"stream-json": "^1.7.1", "stream-json": "^1.7.1",
"tap-xunit": "^2.4.1", "tap-xunit": "^2.4.1",
"temp": "^0.8.3", "temp": "^0.8.3",
@ -93,7 +93,7 @@
"lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"", "lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
"lint:docs-relative-links": "electron-lint-markdown-links --root docs \"**/*.md\"", "lint:docs-relative-links": "electron-lint-markdown-links --root docs \"**/*.md\"",
"lint:markdownlint": "electron-markdownlint \"*.md\" \"docs/**/*.md\"", "lint:markdownlint": "electron-markdownlint \"*.md\" \"docs/**/*.md\"",
"lint:js-in-markdown": "standard-markdown docs", "lint:js-in-markdown": "electron-lint-markdown-standard --root docs \"**/*.md\"",
"create-api-json": "node script/create-api-json.js", "create-api-json": "node script/create-api-json.js",
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js", "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
"gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts", "gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts",

1328
yarn.lock

File diff suppressed because it is too large Load diff