mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
use import instead of require
This commit is contained in:
parent
cee275f61b
commit
2a4771fad5
3 changed files with 3 additions and 9 deletions
|
|
@ -17,7 +17,7 @@ remoteInitialize();
|
|||
import {resolve} from 'path';
|
||||
|
||||
// Packages
|
||||
import {app, BrowserWindow, Menu} from 'electron';
|
||||
import {app, BrowserWindow, Menu, screen} from 'electron';
|
||||
import {gitDescribe} from 'git-describe';
|
||||
import isDev from 'electron-is-dev';
|
||||
import * as config from './config';
|
||||
|
|
@ -98,8 +98,6 @@ app.on('ready', () =>
|
|||
let [startX, startY] = winSet.position;
|
||||
|
||||
const [width, height] = options.size ? options.size : cfg.windowSize || winSet.size;
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const {screen} = require('electron');
|
||||
|
||||
const winPos = options.position;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {IPty, IWindowsPtyForkOptions, spawn as npSpawn} from 'node-pty';
|
|||
import {cliScriptPath} from './config/paths';
|
||||
import {dirname} from 'path';
|
||||
import shellEnv from 'shell-env';
|
||||
import osLocale from 'os-locale';
|
||||
|
||||
const createNodePtyError = () =>
|
||||
new Error(
|
||||
|
|
@ -106,8 +107,6 @@ export default class Session extends EventEmitter {
|
|||
}
|
||||
|
||||
init({uid, rows, cols: columns, cwd, shell: _shell, shellArgs: _shellArgs}: SessionOptions) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const osLocale = require('os-locale') as typeof import('os-locale');
|
||||
const cleanEnv =
|
||||
process.env['APPIMAGE'] && process.env['APPDIR'] ? shellEnv.sync(_shell || defaultShell) : process.env;
|
||||
const baseEnv = Object.assign(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const Copy = require('copy-webpack-plugin');
|
||||
import Copy from 'copy-webpack-plugin';
|
||||
import path from 'path';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import webpack from 'webpack';
|
||||
|
|
@ -29,7 +28,6 @@ const config: webpack.Configuration[] = [
|
|||
]
|
||||
},
|
||||
plugins: [
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
new Copy({
|
||||
patterns: [
|
||||
{
|
||||
|
|
@ -99,7 +97,6 @@ const config: webpack.Configuration[] = [
|
|||
NODE_ENV: JSON.stringify(nodeEnv)
|
||||
}
|
||||
}),
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
new Copy({
|
||||
patterns: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue