@liuli-util/cli 3.12.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -36
- package/bin.js +3 -0
- package/dist/bin.js +53 -53
- package/dist/bin.js.map +3 -3
- package/dist/commands/esbuild/ESBuildProgram.d.ts +6 -9
- package/dist/commands/esbuild/ESBuildProgram.d.ts.map +1 -1
- package/dist/commands/esbuild/index.d.ts.map +1 -1
- package/dist/commands/esbuild/util/esbuildPlugins.d.ts +5 -0
- package/dist/commands/esbuild/util/esbuildPlugins.d.ts.map +1 -1
- package/dist/commands/generate/GenerateProgram.d.ts.map +1 -1
- package/dist/commands/sync/SyncProgram.d.ts.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
- package/src/commands/esbuild/ESBuildProgram.ts +26 -74
- package/src/commands/esbuild/__tests__/ESBuildProgram.test.ts +13 -20
- package/src/commands/esbuild/index.ts +16 -21
- package/src/commands/esbuild/util/esbuildPlugins.ts +20 -7
- package/src/commands/generate/GenerateProgram.ts +8 -24
- package/src/commands/generate/__tests__/GenerateProgram.test.ts +17 -17
- package/src/commands/sync/SyncProgram.ts +15 -41
- package/src/commands/sync/__tests__/.temp/package.json +16 -0
- package/src/commands/sync/__tests__/SyncProgram.test.ts +15 -3
- package/src/commands/sync/__tests__/when.test.ts +6 -18
- package/templates/cli/bin.js +3 -0
- package/templates/cli/package.json +5 -11
- package/templates/lib/package.json +2 -8
- package/src/commands/esbuild/__tests__/.temp/getDeps/package.json +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'esbuild'
|
|
2
|
+
import { writeJson } from 'fs-extra'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* 处理 nodejs 原生模块
|
|
@@ -28,13 +29,10 @@ export function nativeNodeModules(): Plugin {
|
|
|
28
29
|
// If a ".node" file is imported within a module in the "node-file" namespace, put
|
|
29
30
|
// it in the "file" namespace where esbuild's default loading behavior will handle
|
|
30
31
|
// it. It is already an absolute path since we resolved it to one above.
|
|
31
|
-
build.onResolve(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
namespace: 'file',
|
|
36
|
-
}),
|
|
37
|
-
)
|
|
32
|
+
build.onResolve({ filter: /\.node$/, namespace: 'node-file' }, (args) => ({
|
|
33
|
+
path: args.path,
|
|
34
|
+
namespace: 'file',
|
|
35
|
+
}))
|
|
38
36
|
|
|
39
37
|
// Tell esbuild's default loading behavior to use the "file" loader for
|
|
40
38
|
// these ".node" files.
|
|
@@ -80,3 +78,18 @@ export function autoExternal(): Plugin {
|
|
|
80
78
|
},
|
|
81
79
|
}
|
|
82
80
|
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 生成 metafile 的插件
|
|
84
|
+
* @param metafilePath
|
|
85
|
+
*/
|
|
86
|
+
export function metafile(metafilePath: string): Plugin {
|
|
87
|
+
return {
|
|
88
|
+
name: 'esbuild-plugin-metafile',
|
|
89
|
+
setup(builder) {
|
|
90
|
+
builder.onEnd(async (result) => {
|
|
91
|
+
await writeJson(metafilePath, result.metafile)
|
|
92
|
+
})
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
|
-
import {
|
|
3
|
-
copy,
|
|
4
|
-
pathExists,
|
|
5
|
-
readdir,
|
|
6
|
-
readFile,
|
|
7
|
-
readJSON,
|
|
8
|
-
remove,
|
|
9
|
-
writeFile,
|
|
10
|
-
writeJSON,
|
|
11
|
-
} from 'fs-extra'
|
|
2
|
+
import { copy, pathExists, readdir, readFile, readJSON, remove, writeFile, writeJSON } from 'fs-extra'
|
|
12
3
|
import { prompt } from 'enquirer'
|
|
13
4
|
import { SyncProgram } from '../sync/SyncProgram'
|
|
14
5
|
import { PathUtil } from '../../PathUtil'
|
|
@@ -43,12 +34,9 @@ export class GenerateProgram {
|
|
|
43
34
|
if (!config.template) {
|
|
44
35
|
const { template } = await prompt<{ template: TemplateTypeEnum }>({
|
|
45
36
|
name: 'template',
|
|
46
|
-
type: '
|
|
37
|
+
type: 'select',
|
|
47
38
|
message: '请选择模板',
|
|
48
|
-
choices: [
|
|
49
|
-
TemplateTypeEnum.Lib,
|
|
50
|
-
TemplateTypeEnum.Cli,
|
|
51
|
-
] as TemplateTypeEnum[],
|
|
39
|
+
choices: [TemplateTypeEnum.Lib, TemplateTypeEnum.Cli] as TemplateTypeEnum[],
|
|
52
40
|
})
|
|
53
41
|
config.template = template
|
|
54
42
|
}
|
|
@@ -60,15 +48,9 @@ export class GenerateProgram {
|
|
|
60
48
|
- 修改 package.json,删除 private,修改名字
|
|
61
49
|
模板特定修改
|
|
62
50
|
*/
|
|
63
|
-
const srcFile = path.resolve(
|
|
64
|
-
PathUtil.RootPath,
|
|
65
|
-
`templates/${config.template}`,
|
|
66
|
-
)
|
|
51
|
+
const srcFile = path.resolve(PathUtil.RootPath, `templates/${config.template}`)
|
|
67
52
|
const destFile = path.resolve(config.dest)
|
|
68
|
-
if (
|
|
69
|
-
(await pathExists(destFile)) &&
|
|
70
|
-
(await readdir(destFile)).some((file) => pathExists(file))
|
|
71
|
-
) {
|
|
53
|
+
if ((await pathExists(destFile)) && (await readdir(destFile)).some((file) => pathExists(file))) {
|
|
72
54
|
const { override } = await prompt<{
|
|
73
55
|
override: boolean
|
|
74
56
|
}>({
|
|
@@ -82,7 +64,9 @@ export class GenerateProgram {
|
|
|
82
64
|
}
|
|
83
65
|
}
|
|
84
66
|
await remove(destFile)
|
|
85
|
-
await copy(srcFile, destFile
|
|
67
|
+
await copy(srcFile, destFile, {
|
|
68
|
+
filter: (source) => path.basename(source) !== 'node_modules',
|
|
69
|
+
})
|
|
86
70
|
await GenerateProgram.updatePackageJSON(destFile)
|
|
87
71
|
await GenerateProgram.updateReadme(destFile)
|
|
88
72
|
if (config.initSync) {
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { GenerateProgram, TemplateTypeEnum } from '../GenerateProgram'
|
|
2
2
|
import path from 'path'
|
|
3
|
-
import {
|
|
4
|
-
mkdir,
|
|
5
|
-
pathExists,
|
|
6
|
-
readFile,
|
|
7
|
-
readJson,
|
|
8
|
-
remove,
|
|
9
|
-
writeFile,
|
|
10
|
-
writeJson,
|
|
11
|
-
} from 'fs-extra'
|
|
3
|
+
import { mkdir, pathExists, readFile, readJson, remove, writeFile, writeJson } from 'fs-extra'
|
|
12
4
|
import { PackageJson } from 'type-fest'
|
|
13
5
|
|
|
14
6
|
describe('测试 InitProgram', () => {
|
|
15
7
|
const initProgram = new GenerateProgram()
|
|
16
|
-
const tempPath = path.resolve(__dirname, 'temp')
|
|
8
|
+
const tempPath = path.resolve(__dirname, '.temp')
|
|
17
9
|
it('生成项目', async () => {
|
|
18
10
|
const dest = path.resolve(tempPath, 'lib-demo')
|
|
19
11
|
await remove(dest)
|
|
@@ -22,7 +14,7 @@ describe('测试 InitProgram', () => {
|
|
|
22
14
|
dest,
|
|
23
15
|
})
|
|
24
16
|
expect(await pathExists(dest)).toBeTruthy()
|
|
25
|
-
}
|
|
17
|
+
})
|
|
26
18
|
describe('测试一些钩子', () => {
|
|
27
19
|
beforeAll(async () => {
|
|
28
20
|
await remove(tempPath)
|
|
@@ -34,18 +26,26 @@ describe('测试 InitProgram', () => {
|
|
|
34
26
|
name: '@liuli-util/template',
|
|
35
27
|
})
|
|
36
28
|
await GenerateProgram.updatePackageJSON(tempPath)
|
|
37
|
-
expect(
|
|
38
|
-
((await readJson(jsonPath)) as PackageJson).name?.endsWith('temp'),
|
|
39
|
-
).toBeTruthy()
|
|
29
|
+
expect(((await readJson(jsonPath)) as PackageJson).name?.endsWith('temp')).toBeTruthy()
|
|
40
30
|
})
|
|
41
31
|
it('测试修改 readme', async () => {
|
|
42
32
|
const readmePath = path.resolve(tempPath, 'README.md')
|
|
43
33
|
await writeFile(readmePath, `# @liuli-util/template`)
|
|
44
34
|
await GenerateProgram.updateReadme(tempPath)
|
|
45
35
|
console.log('readme: ', await readFile(readmePath, 'utf-8'))
|
|
46
|
-
expect(
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
expect((await readFile(readmePath, 'utf-8')).endsWith('temp')).toBeTruthy()
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
describe('测试错误修复', () => {
|
|
40
|
+
it('修复 monorepo 中使用 cli 会复制 node_modules 的错误', async () => {
|
|
41
|
+
const program = new GenerateProgram()
|
|
42
|
+
const destPath = path.resolve(tempPath, 'test-cli')
|
|
43
|
+
await program.generate({
|
|
44
|
+
template: TemplateTypeEnum.Cli,
|
|
45
|
+
dest: destPath,
|
|
46
|
+
initSync: false,
|
|
47
|
+
})
|
|
48
|
+
expect(await pathExists(path.resolve(destPath, 'node_modules'))).toBeFalsy()
|
|
49
49
|
})
|
|
50
50
|
})
|
|
51
51
|
})
|
|
@@ -13,13 +13,9 @@ import { PathUtil } from '../../PathUtil'
|
|
|
13
13
|
|
|
14
14
|
export async function mergeJson(base: string, json: object): Promise<void> {
|
|
15
15
|
const pkgJsonFilePath = path.resolve(base, './package.json')
|
|
16
|
-
await writeJson(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{
|
|
20
|
-
spaces: 2,
|
|
21
|
-
},
|
|
22
|
-
)
|
|
16
|
+
await writeJson(pkgJsonFilePath, merge(await readJson(pkgJsonFilePath), json), {
|
|
17
|
+
spaces: 2,
|
|
18
|
+
})
|
|
23
19
|
}
|
|
24
20
|
|
|
25
21
|
export type SyncConfigType =
|
|
@@ -68,10 +64,7 @@ export class SyncProgram {
|
|
|
68
64
|
} as PackageJson)
|
|
69
65
|
},
|
|
70
66
|
async when(): Promise<boolean> {
|
|
71
|
-
return (
|
|
72
|
-
(await isNpmPackage()) &&
|
|
73
|
-
((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
74
|
-
)
|
|
67
|
+
return (await isNpmPackage()) && ((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
75
68
|
},
|
|
76
69
|
},
|
|
77
70
|
{
|
|
@@ -91,23 +84,14 @@ export class SyncProgram {
|
|
|
91
84
|
} as PackageJson)
|
|
92
85
|
},
|
|
93
86
|
async when(): Promise<boolean> {
|
|
94
|
-
return (
|
|
95
|
-
(await isNpmPackage()) &&
|
|
96
|
-
((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
97
|
-
)
|
|
87
|
+
return (await isNpmPackage()) && ((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
98
88
|
},
|
|
99
89
|
},
|
|
100
90
|
{
|
|
101
91
|
type: 'gitignore',
|
|
102
92
|
handler: async () => {
|
|
103
93
|
const gitignorePath = path.resolve(this.base, '.gitignore')
|
|
104
|
-
await writeFile(
|
|
105
|
-
gitignorePath,
|
|
106
|
-
await readFile(
|
|
107
|
-
path.resolve(PathUtil.RootPath, '_gitignore'),
|
|
108
|
-
'utf-8',
|
|
109
|
-
),
|
|
110
|
-
)
|
|
94
|
+
await writeFile(gitignorePath, await readFile(path.resolve(PathUtil.RootPath, '_gitignore'), 'utf-8'))
|
|
111
95
|
},
|
|
112
96
|
},
|
|
113
97
|
{
|
|
@@ -123,11 +107,7 @@ export class SyncProgram {
|
|
|
123
107
|
} as PackageJson)
|
|
124
108
|
},
|
|
125
109
|
async when(): Promise<boolean> {
|
|
126
|
-
return (
|
|
127
|
-
(await isNpmPackage()) &&
|
|
128
|
-
!(await isIncludeDep(['vue'])) &&
|
|
129
|
-
!(await isIncludeDep(['react']))
|
|
130
|
-
)
|
|
110
|
+
return (await isNpmPackage()) && !(await isIncludeDep(['vue'])) && !(await isIncludeDep(['react']))
|
|
131
111
|
},
|
|
132
112
|
},
|
|
133
113
|
{
|
|
@@ -154,6 +134,10 @@ export class SyncProgram {
|
|
|
154
134
|
preset: 'ts-jest',
|
|
155
135
|
testMatch: ['<rootDir>/src/**/__tests__/*.test.ts'],
|
|
156
136
|
},
|
|
137
|
+
devDependencies: {
|
|
138
|
+
jest: '^27.4.3',
|
|
139
|
+
'ts-jest': '^27.0.7',
|
|
140
|
+
},
|
|
157
141
|
})
|
|
158
142
|
},
|
|
159
143
|
},
|
|
@@ -171,10 +155,7 @@ export class SyncProgram {
|
|
|
171
155
|
}
|
|
172
156
|
let config = {
|
|
173
157
|
scripts: {
|
|
174
|
-
postinstall: appendScript(
|
|
175
|
-
json?.scripts?.postinstall,
|
|
176
|
-
'npx simple-git-hooks',
|
|
177
|
-
),
|
|
158
|
+
postinstall: appendScript(json?.scripts?.postinstall, 'npx simple-git-hooks'),
|
|
178
159
|
},
|
|
179
160
|
'simple-git-hooks': {
|
|
180
161
|
'pre-commit': 'yarn lint-staged',
|
|
@@ -197,26 +178,19 @@ export class SyncProgram {
|
|
|
197
178
|
await mergeJson(this.base, config as PackageJson)
|
|
198
179
|
},
|
|
199
180
|
async when(): Promise<boolean> {
|
|
200
|
-
return (
|
|
201
|
-
(await isNpmPackage()) &&
|
|
202
|
-
((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
203
|
-
)
|
|
181
|
+
return (await isNpmPackage()) && ((await isYarnRoot()) || !(await isYarnSubModule()))
|
|
204
182
|
},
|
|
205
183
|
},
|
|
206
184
|
]
|
|
207
185
|
|
|
208
186
|
async sync(): Promise<void> {
|
|
209
|
-
const { sync } = (await readJson(
|
|
210
|
-
path.resolve(this.base, 'package.json'),
|
|
211
|
-
)) as {
|
|
187
|
+
const { sync } = (await readJson(path.resolve(this.base, 'package.json'))) as {
|
|
212
188
|
sync?: SyncConfigType[]
|
|
213
189
|
}
|
|
214
190
|
if (!sync) {
|
|
215
191
|
return
|
|
216
192
|
}
|
|
217
|
-
const syncConfigs = this.syncConfigs.filter((config) =>
|
|
218
|
-
sync.includes(config.type),
|
|
219
|
-
)
|
|
193
|
+
const syncConfigs = this.syncConfigs.filter((config) => sync.includes(config.type))
|
|
220
194
|
for (const syncConfig of syncConfigs) {
|
|
221
195
|
await syncConfig.handler()
|
|
222
196
|
}
|
|
@@ -5,7 +5,7 @@ import { merge } from 'lodash-es'
|
|
|
5
5
|
import { PackageJson } from 'type-fest'
|
|
6
6
|
|
|
7
7
|
describe('测试 SyncProgram', () => {
|
|
8
|
-
const tempPath = path.resolve(__dirname, 'temp')
|
|
8
|
+
const tempPath = path.resolve(__dirname, '.temp')
|
|
9
9
|
const syncProgram = new SyncProgram(tempPath)
|
|
10
10
|
beforeEach(async () => {
|
|
11
11
|
await remove(tempPath)
|
|
@@ -30,9 +30,9 @@ describe('测试 SyncProgram', () => {
|
|
|
30
30
|
workspaces,
|
|
31
31
|
} as PackageJson)
|
|
32
32
|
await syncProgram.sync()
|
|
33
|
-
}
|
|
33
|
+
})
|
|
34
34
|
|
|
35
|
-
it('测试初始化同步配置', async () => {
|
|
35
|
+
it.skip('测试初始化同步配置', async () => {
|
|
36
36
|
await writeJson(path.resolve(tempPath, 'lerna.json'), {})
|
|
37
37
|
const file = path.resolve(tempPath, 'package.json')
|
|
38
38
|
await writeJson(file, {
|
|
@@ -42,6 +42,18 @@ describe('测试 SyncProgram', () => {
|
|
|
42
42
|
await syncProgram.init()
|
|
43
43
|
expect(((await readJson(file)).sync as string[]).length).toBeGreaterThan(0)
|
|
44
44
|
}, 100_000)
|
|
45
|
+
|
|
46
|
+
it('测试同步 jest', async () => {
|
|
47
|
+
const jsonPath = path.resolve(tempPath, 'package.json')
|
|
48
|
+
await writeJson(jsonPath, {
|
|
49
|
+
name: 'temp',
|
|
50
|
+
sync: ['jest'] as SyncConfigType[],
|
|
51
|
+
} as PackageJson)
|
|
52
|
+
await syncProgram.sync()
|
|
53
|
+
const json = (await readJson(jsonPath)) as PackageJson
|
|
54
|
+
const devDeps = Object.keys(json.devDependencies!)
|
|
55
|
+
expect(devDeps.includes('jest') && devDeps.includes('ts-jest')).toBeTruthy()
|
|
56
|
+
})
|
|
45
57
|
})
|
|
46
58
|
|
|
47
59
|
it('测试 lodash-es.merge', () => {
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isIncludeDep,
|
|
3
|
-
isNpmPackage,
|
|
4
|
-
isYarnRoot,
|
|
5
|
-
isYarnSubModule,
|
|
6
|
-
} from '../when'
|
|
1
|
+
import { isIncludeDep, isNpmPackage, isYarnRoot, isYarnSubModule } from '../when'
|
|
7
2
|
import { pathExists, readJson } from 'fs-extra'
|
|
8
3
|
import { PackageJson } from 'type-fest'
|
|
9
4
|
import path from 'path'
|
|
@@ -15,32 +10,25 @@ describe('测试 when', () => {
|
|
|
15
10
|
beforeAll(async () => {
|
|
16
11
|
rootPath = (await findParent(__dirname, async (dir) => {
|
|
17
12
|
const jsonPath = path.resolve(dir, 'package.json')
|
|
18
|
-
return (
|
|
19
|
-
(await pathExists(jsonPath)) &&
|
|
20
|
-
!!((await readJson(jsonPath)) as PackageJson).workspaces
|
|
21
|
-
)
|
|
13
|
+
return (await pathExists(jsonPath)) && !!((await readJson(jsonPath)) as PackageJson).workspaces
|
|
22
14
|
}))!
|
|
23
|
-
subModulePath = (await findParent(__dirname, async (dir) =>
|
|
24
|
-
pathExists(path.join(dir, 'package.json')),
|
|
25
|
-
))!
|
|
15
|
+
subModulePath = (await findParent(__dirname, async (dir) => pathExists(path.join(dir, 'package.json'))))!
|
|
26
16
|
})
|
|
27
17
|
it('测试 isNpmPackage', async () => {
|
|
28
18
|
expect(await isNpmPackage(subModulePath)).toBeTruthy()
|
|
29
19
|
expect(await isNpmPackage(rootPath)).toBeTruthy()
|
|
30
20
|
expect(await isNpmPackage(__dirname)).toBeFalsy()
|
|
31
21
|
})
|
|
32
|
-
it('测试 isYarnRoot', async () => {
|
|
22
|
+
it.skip('测试 isYarnRoot', async () => {
|
|
33
23
|
expect(await isYarnRoot(rootPath)).toBeTruthy()
|
|
34
24
|
expect(await isYarnRoot(subModulePath)).toBeFalsy()
|
|
35
25
|
})
|
|
36
|
-
it('测试 isYarnSubModule', async () => {
|
|
26
|
+
it.skip('测试 isYarnSubModule', async () => {
|
|
37
27
|
expect(await isYarnSubModule(subModulePath)).toBeTruthy()
|
|
38
28
|
expect(await isYarnSubModule(rootPath)).toBeFalsy()
|
|
39
29
|
expect(await isYarnSubModule(__dirname)).toBeFalsy()
|
|
40
30
|
})
|
|
41
31
|
it('测试 isIncludeDep', async () => {
|
|
42
|
-
expect(
|
|
43
|
-
await isIncludeDep(['vue'], path.resolve(__dirname, 'temp')),
|
|
44
|
-
).toBeFalsy()
|
|
32
|
+
expect(await isIncludeDep(['vue'], path.resolve(__dirname, 'temp'))).toBeFalsy()
|
|
45
33
|
})
|
|
46
34
|
})
|
|
@@ -8,37 +8,31 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "rimraf dist && liuli-cli build cli",
|
|
10
10
|
"dev": "liuli-cli build cli -w",
|
|
11
|
-
"start": "esno src/bin.ts"
|
|
12
|
-
"docs:server": "live-server docs",
|
|
13
|
-
"docs:dev": "typedoc --watch",
|
|
14
|
-
"docs:build": "rimraf docs && typedoc",
|
|
15
|
-
"docs:deploy": "yarn docs:build && gh-pages -d docs/ -e / -a"
|
|
11
|
+
"start": "esno src/bin.ts"
|
|
16
12
|
},
|
|
17
13
|
"bin": {
|
|
18
|
-
"cli-name": "
|
|
14
|
+
"cli-name": "./bin.js"
|
|
19
15
|
},
|
|
20
16
|
"jest": {
|
|
21
17
|
"preset": "ts-jest"
|
|
22
18
|
},
|
|
23
19
|
"dependencies": {
|
|
24
20
|
"commander": "^8.2.0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
21
|
+
"enquirer": "^2.3.6",
|
|
22
|
+
"fs-extra": "^10.0.0"
|
|
27
23
|
},
|
|
28
24
|
"devDependencies": {
|
|
29
|
-
"@liuli-util/cli": "
|
|
25
|
+
"@liuli-util/cli": "workspace:*",
|
|
30
26
|
"@types/fs-extra": "^9.0.13",
|
|
31
27
|
"@types/inquirer": "^8.1.2",
|
|
32
28
|
"@types/jest": "^27.0.2",
|
|
33
29
|
"@types/lodash": "^4.14.173",
|
|
34
30
|
"@types/node": "^16.9.6",
|
|
35
31
|
"esno": "^0.9.1",
|
|
36
|
-
"gh-pages": "^3.2.3",
|
|
37
32
|
"jest": "^27.2.1",
|
|
38
33
|
"rimraf": "^3.0.2",
|
|
39
34
|
"ts-jest": "^27.0.5",
|
|
40
35
|
"type-fest": "^2.3.4",
|
|
41
|
-
"typedoc": "^0.22.4",
|
|
42
36
|
"typescript": "^4.4.3"
|
|
43
37
|
}
|
|
44
38
|
}
|
|
@@ -8,25 +8,19 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rimraf dist && liuli-cli build pkg",
|
|
11
|
-
"dev": "liuli-cli build pkg -w"
|
|
12
|
-
"docs:server": "live-server docs",
|
|
13
|
-
"docs:dev": "typedoc --watch",
|
|
14
|
-
"docs:build": "rimraf docs && typedoc",
|
|
15
|
-
"docs:deploy": "yarn docs:build && gh-pages -d docs/ -e / -a"
|
|
11
|
+
"dev": "liuli-cli build pkg -w"
|
|
16
12
|
},
|
|
17
13
|
"jest": {
|
|
18
14
|
"preset": "ts-jest"
|
|
19
15
|
},
|
|
20
16
|
"devDependencies": {
|
|
21
|
-
"@liuli-util/cli": "
|
|
17
|
+
"@liuli-util/cli": "workspace:*",
|
|
22
18
|
"@types/jest": "^27.0.2",
|
|
23
19
|
"esno": "^0.9.1",
|
|
24
|
-
"gh-pages": "^3.2.3",
|
|
25
20
|
"jest": "^27.2.1",
|
|
26
21
|
"rimraf": "^3.0.2",
|
|
27
22
|
"ts-jest": "^27.0.5",
|
|
28
23
|
"type-fest": "^2.3.4",
|
|
29
|
-
"typedoc": "^0.22.4",
|
|
30
24
|
"typescript": "^4.4.3"
|
|
31
25
|
}
|
|
32
26
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"devDependencies":{"@types/node":"16"},"dependencies":{"ora":"^6"},"peerDependencies":{"typescript":"^4"}}
|