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 { 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({
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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()
|
||||||
|
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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')
|
||||||
|
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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({
|
||||||
|
|
Loading…
Reference in a new issue