提交 9831d3b3 编写于 作者: G Guy Bedford 提交者: Joe Haddad

is-docker, is-wsl

上级 5da7d9ed
......@@ -70,8 +70,6 @@
"find-up": "4.0.0",
"fork-ts-checker-webpack-plugin": "3.1.1",
"ignore-loader": "0.1.2",
"is-docker": "2.0.0",
"is-wsl": "2.1.1",
"jest-worker": "24.9.0",
"json5": "2.1.2",
"jsonwebtoken": "8.5.1",
......@@ -193,6 +191,8 @@
"fresh": "0.5.2",
"gzip-size": "5.1.1",
"http-proxy": "1.18.0",
"is-docker": "2.0.0",
"is-wsl": "2.1.1",
"nanoid": "2.0.3",
"resolve": "1.11.0",
"taskr": "1.1.0",
......
......@@ -349,6 +349,20 @@ export async function ncc_http_proxy(task, opts) {
.target('dist/compiled/http-proxy')
}
// eslint-disable-next-line camelcase
export async function ncc_is_docker(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('is-docker')))
.ncc({ packageName: 'is-docker' })
.target('dist/compiled/is-docker')
}
// eslint-disable-next-line camelcase
export async function ncc_is_wsl(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('is-wsl')))
.ncc({ packageName: 'is-wsl' })
.target('dist/compiled/is-wsl')
}
// eslint-disable-next-line camelcase
export async function ncc_nanoid(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
......@@ -417,6 +431,8 @@ export async function precompile(task) {
'ncc_fresh',
'ncc_gzip_size',
'ncc_http_proxy',
'ncc_is_docker',
'ncc_is_wsl',
'ncc_nanoid',
'ncc_resolve',
'ncc_text_table',
......
import isDockerFunction from 'is-docker'
import isWslBoolean from 'is-wsl'
import isDockerFunction from 'next/dist/compiled/is-docker'
import isWslBoolean from 'next/dist/compiled/is-wsl'
import os from 'os'
import * as ciEnvironment from './ci-info'
......
import chalk from 'next/dist/compiled/chalk'
import Conf from 'conf'
import { BinaryLike, createHash, randomBytes } from 'crypto'
import isDockerFunction from 'is-docker'
import isDockerFunction from 'next/dist/compiled/is-docker'
import path from 'path'
import { getAnonymousMeta } from './anonymous-meta'
......
......@@ -108,6 +108,14 @@ declare module 'next/dist/compiled/http-proxy' {
import m from 'http-proxy'
export = m
}
declare module 'next/dist/compiled/is-docker' {
import m from 'is-docker'
export = m
}
declare module 'next/dist/compiled/is-wsl' {
import m from 'is-wsl'
export = m
}
declare module 'next/dist/compiled/nanoid/index.js' {
function nanoid(size?: number): string
export = nanoid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册