Commit 0f80e127 authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

launch-editor

parent e11a7c13
......@@ -71,7 +71,6 @@
"fork-ts-checker-webpack-plugin": "3.1.1",
"ignore-loader": "0.1.2",
"jest-worker": "24.9.0",
"launch-editor": "2.2.1",
"loader-utils": "2.0.0",
"lodash.curry": "4.1.1",
"lru-cache": "5.1.1",
......@@ -193,6 +192,7 @@
"is-wsl": "2.1.1",
"json5": "2.1.2",
"jsonwebtoken": "8.5.1",
"launch-editor": "2.2.1",
"nanoid": "2.0.3",
"resolve": "1.11.0",
"taskr": "1.1.0",
......
import url from 'url'
import launchEditor from 'launch-editor'
import launchEditor from 'next/dist/compiled/launch-editor'
import fs from 'fs'
import path from 'path'
import { IncomingMessage, ServerResponse } from 'http'
......
......@@ -377,6 +377,16 @@ export async function ncc_jsonwebtoken(task, opts) {
.target('dist/compiled/jsonwebtoken')
}
// eslint-disable-next-line camelcase
export async function ncc_launch_editor(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('launch-editor')))
.ncc({
packageName: 'launch-editor',
externals: { chalk: 'next/dist/compiled/chalk' },
})
.target('dist/compiled/launch-editor')
}
// eslint-disable-next-line camelcase
export async function ncc_nanoid(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
......@@ -449,6 +459,7 @@ export async function precompile(task) {
'ncc_is_wsl',
'ncc_json5',
'ncc_jsonwebtoken',
'ncc_launch_editor',
'ncc_nanoid',
'ncc_resolve',
'ncc_text_table',
......
......@@ -124,6 +124,10 @@ declare module 'next/dist/compiled/jsonwebtoken' {
import m from 'jsonwebtoken'
export = m
}
declare module 'next/dist/compiled/launch-editor' {
import m from 'launch-editor'
export = m
}
declare module 'next/dist/compiled/nanoid/index.js' {
function nanoid(size?: number): string
export = nanoid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment