refactor: use node scheme imports in docs/fiddles (#39110)

This commit is contained in:
Milan Burda 2023-07-17 10:30:53 +02:00 committed by GitHub
parent 9645f7f6d8
commit 626f46f75a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 24 additions and 24 deletions

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain, nativeTheme } = require('electron') const { app, BrowserWindow, ipcMain, nativeTheme } = require('electron')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -1,7 +1,7 @@
const { app, BrowserWindow, ipcMain } = require('electron') const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path') const path = require('node:path')
const fs = require('fs') const fs = require('node:fs')
const https = require('https') const https = require('node:https')
function createWindow () { function createWindow () {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -1,6 +1,6 @@
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const fs = require('fs') const fs = require('node:fs')
const path = require('path') const path = require('node:path')
app.disableHardwareAcceleration() app.disableHardwareAcceleration()

View file

@ -1,6 +1,6 @@
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const fs = require('fs') const fs = require('node:fs')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const os = require('os') const os = require('node:os')
function createWindow () { function createWindow () {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain } = require('electron') const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path') const path = require('node:path')
let bluetoothPinCallback let bluetoothPinCallback
let selectBluetoothCallback let selectBluetoothCallback

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain } = require('electron') const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
const mainWindow = new BrowserWindow({ const mainWindow = new BrowserWindow({

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain, dialog } = require('electron') const { app, BrowserWindow, ipcMain, dialog } = require('electron')
const path = require('path') const path = require('node:path')
async function handleFileOpen () { async function handleFileOpen () {
const { canceled, filePaths } = await dialog.showOpenDialog() const { canceled, filePaths } = await dialog.showOpenDialog()

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, Menu, ipcMain } = require('electron') const { app, BrowserWindow, Menu, ipcMain } = require('electron')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
const mainWindow = new BrowserWindow({ const mainWindow = new BrowserWindow({

View file

@ -1,6 +1,6 @@
// Modules to control application life and create native browser window // Modules to control application life and create native browser window
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
// Create the browser window. // Create the browser window.

View file

@ -1,8 +1,8 @@
const { desktopCapturer, shell, ipcRenderer } = require('electron') const { desktopCapturer, shell, ipcRenderer } = require('electron')
const fs = require('fs') const fs = require('node:fs')
const os = require('os') const os = require('node:os')
const path = require('path') const path = require('node:path')
const screenshot = document.getElementById('screen-shot') const screenshot = document.getElementById('screen-shot')
const screenshotMsg = document.getElementById('screenshot-path') const screenshotMsg = document.getElementById('screenshot-path')

View file

@ -1,5 +1,5 @@
const { shell } = require('electron') const { shell } = require('electron')
const os = require('os') const os = require('node:os')
const fileManagerBtn = document.getElementById('open-file-manager') const fileManagerBtn = document.getElementById('open-file-manager')

View file

@ -1,5 +1,5 @@
const { shell } = require('electron') const { shell } = require('electron')
const os = require('os') const os = require('node:os')
const exLinksBtn = document.getElementById('open-ex-links') const exLinksBtn = document.getElementById('open-ex-links')
const fileManagerBtn = document.getElementById('open-file-manager') const fileManagerBtn = document.getElementById('open-file-manager')

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const path = require('path') const path = require('node:path')
function createWindow () { function createWindow () {
const win = new BrowserWindow({ const win = new BrowserWindow({

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain, clipboard } = require('electron') const { app, BrowserWindow, ipcMain, clipboard } = require('electron')
const path = require('path') const path = require('node:path')
let mainWindow = null let mainWindow = null

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow, ipcMain, clipboard } = require('electron') const { app, BrowserWindow, ipcMain, clipboard } = require('electron')
const path = require('path') const path = require('node:path')
let mainWindow = null let mainWindow = null

View file

@ -1,6 +1,6 @@
// Modules to control application life and create native browser window // Modules to control application life and create native browser window
const { app, BrowserWindow, ipcMain, shell, dialog } = require('electron') const { app, BrowserWindow, ipcMain, shell, dialog } = require('electron')
const path = require('path') const path = require('node:path')
let mainWindow let mainWindow

View file

@ -1,5 +1,5 @@
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
const path = require('path') const path = require('node:path')
const createWindow = () => { const createWindow = () => {
const win = new BrowserWindow({ const win = new BrowserWindow({