refactor: use node scheme imports in docs/fiddles (#39110)
This commit is contained in:
parent
9645f7f6d8
commit
626f46f75a
18 changed files with 24 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain, nativeTheme } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const https = require('https')
|
||||
const path = require('node:path')
|
||||
const fs = require('node:fs')
|
||||
const https = require('node:https')
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { app, BrowserWindow } = require('electron')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
|
||||
app.disableHardwareAcceleration()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { app, BrowserWindow } = require('electron')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow } = require('electron')
|
||||
const os = require('os')
|
||||
const os = require('node:os')
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
let bluetoothPinCallback
|
||||
let selectBluetoothCallback
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
const mainWindow = new BrowserWindow({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain, dialog } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
async function handleFileOpen () {
|
||||
const { canceled, filePaths } = await dialog.showOpenDialog()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, Menu, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
const mainWindow = new BrowserWindow({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const { desktopCapturer, shell, ipcRenderer } = require('electron')
|
||||
|
||||
const fs = require('fs')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const fs = require('node:fs')
|
||||
const os = require('node:os')
|
||||
const path = require('node:path')
|
||||
|
||||
const screenshot = document.getElementById('screen-shot')
|
||||
const screenshotMsg = document.getElementById('screenshot-path')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { shell } = require('electron')
|
||||
const os = require('os')
|
||||
const os = require('node:os')
|
||||
|
||||
const fileManagerBtn = document.getElementById('open-file-manager')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { shell } = require('electron')
|
||||
const os = require('os')
|
||||
const os = require('node:os')
|
||||
|
||||
const exLinksBtn = document.getElementById('open-ex-links')
|
||||
const fileManagerBtn = document.getElementById('open-file-manager')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain, clipboard } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
let mainWindow = null
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow, ipcMain, clipboard } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
let mainWindow = null
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow, ipcMain, shell, dialog } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
let mainWindow
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const { app, BrowserWindow } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
const createWindow = () => {
|
||||
const win = new BrowserWindow({
|
||||
|
|
Loading…
Reference in a new issue