chore: cleanup imports
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { delimiter, dirname, normalize, join } from 'path'
|
||||
import { Buffer } from 'buffer'
|
||||
import { createHash } from 'crypto'
|
||||
import { createReadStream } from 'fs'
|
||||
import { Readable } from 'stream'
|
||||
import { spawn } from 'child_process'
|
||||
|
||||
+1
-3
@@ -1,6 +1,5 @@
|
||||
import { EOL } from 'os'
|
||||
import { compose, Middleware } from 'app-builder'
|
||||
import { NexeTarget } from './target'
|
||||
import { compose } from 'app-builder'
|
||||
import { NexeCompiler } from './compiler'
|
||||
import { normalizeOptions, NexeOptions, NexePatch } from './options'
|
||||
import resource from './steps/resource'
|
||||
@@ -18,7 +17,6 @@ async function compile(
|
||||
) {
|
||||
const options = normalizeOptions(compilerOptions)
|
||||
const compiler = new NexeCompiler(options)
|
||||
const build = options.build
|
||||
|
||||
const nexe = compose(
|
||||
clean,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import * as parseArgv from 'minimist'
|
||||
import { NexeCompiler } from './compiler'
|
||||
import { isWindows, padRight } from './util'
|
||||
import { basename, extname, join, isAbsolute, relative, dirname, resolve } from 'path'
|
||||
import { isWindows } from './util'
|
||||
import { basename, extname, join, isAbsolute, resolve } from 'path'
|
||||
import { getTarget, NexeTarget } from './target'
|
||||
import { EOL, homedir } from 'os'
|
||||
import chalk from 'chalk'
|
||||
|
||||
@@ -48,6 +48,6 @@ const contentBuffer = Buffer.from(Array(contentSize))
|
||||
fs.readSync(fd, contentBuffer, 0, contentSize, contentStart)
|
||||
fs.closeSync(fd)
|
||||
const Module = require('module')
|
||||
process.mainModule = new Module(process.execPath, null)
|
||||
process.mainModule!.loaded = true
|
||||
;(process.mainModule as any)._compile(contentBuffer.toString(), process.execPath)
|
||||
const mod = new Module(process.execPath, null)
|
||||
mod.loaded = true
|
||||
mod._compile(contentBuffer.toString(), process.execPath)
|
||||
|
||||
@@ -5,7 +5,6 @@ import cli from './disable-node-cli'
|
||||
import flags from './flags'
|
||||
import ico from './ico'
|
||||
import rc from './node-rc'
|
||||
import { NexeCompiler, NexeOptions } from '../compiler'
|
||||
|
||||
const patches = [gyp, bootNexe, buildFixes, cli, flags, ico, rc]
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import { NexeCompiler } from '../compiler'
|
||||
import { readFileSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
import { wrap } from '../util'
|
||||
|
||||
function semverGt(version: string, operand: string) {
|
||||
const [cMajor, cMinor, cPatch] = version.split('.').map(Number)
|
||||
|
||||
+1
-10
@@ -1,14 +1,5 @@
|
||||
import got = require('got')
|
||||
import download = require('download')
|
||||
import {
|
||||
NodePlatform,
|
||||
NodeArch,
|
||||
platforms,
|
||||
architectures,
|
||||
NexeTarget,
|
||||
getTarget,
|
||||
targetsEqual
|
||||
} from './target'
|
||||
import { platforms, architectures, NexeTarget, getTarget, targetsEqual } from './target'
|
||||
export { NexeTarget }
|
||||
|
||||
const versionsToSkip = [0, 1, 2, 3, 4, 5, 7, 9, 11]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { NexeCompiler } from '../compiler'
|
||||
import { readFileAsync, writeFileAsync } from '../util'
|
||||
import { resolve, relative } from 'path'
|
||||
import { NexeOptions } from '../options'
|
||||
import resolveFiles from 'resolve-dependencies'
|
||||
|
||||
function makeRelative(cwd: string, path: string) {
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
import { normalize, relative } from 'path'
|
||||
import { Readable } from 'stream'
|
||||
import { createWriteStream, chmodSync, statSync } from 'fs'
|
||||
import { readFileAsync, dequote, isWindows } from '../util'
|
||||
import { dequote } from '../util'
|
||||
import { NexeCompiler } from '../compiler'
|
||||
import { NexeTarget } from '../target'
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import { pathExistsAsync } from '../util'
|
||||
import { LogStep } from '../logger'
|
||||
import { IncomingMessage } from 'http'
|
||||
import { NexeCompiler } from '../compiler'
|
||||
import { NexeTarget } from '../target'
|
||||
|
||||
function fetchNodeSourceAsync(dest: string, url: string, step: LogStep, options = {}) {
|
||||
const setText = (p: number) => step.modify(`Downloading Node: ${p.toFixed()}%...`)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { readFileAsync, isDirectoryAsync, each } from '../util'
|
||||
import { Buffer } from 'buffer'
|
||||
import * as globs from 'globby'
|
||||
import { NexeCompiler } from '../compiler'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user