aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--types/generate-package.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/types/generate-package.ts b/types/generate-package.ts
index e20e9b624..a4f049a31 100644
--- a/types/generate-package.ts
+++ b/types/generate-package.ts
@@ -1,8 +1,8 @@
1import { copyFile, readJson, writeFile, writeJSON } from 'fs-extra'
2import { resolve } from 'path'
3import { cwd } from 'process'
4import { execSync } from 'child_process' 1import { execSync } from 'child_process'
5import depcheck, { PackageDependencies } from 'depcheck' 2import depcheck, { PackageDependencies } from 'depcheck'
3import { copyFile, readJson, remove, writeFile, writeJSON } from 'fs-extra'
4import { resolve } from 'path'
5import { cwd } from 'process'
6 6
7run() 7run()
8 .then(() => process.exit(0)) 8 .then(() => process.exit(0))
@@ -12,8 +12,6 @@ run()
12 }) 12 })
13 13
14async function run () { 14async function run () {
15 execSync('npm run tsc -- -b --verbose types', { stdio: 'inherit' })
16
17 const typesPath = resolve(cwd(), './types/') 15 const typesPath = resolve(cwd(), './types/')
18 const typesDistPath = resolve(cwd(), typesPath, './dist/') 16 const typesDistPath = resolve(cwd(), typesPath, './dist/')
19 const typesDistPackageJsonPath = resolve(typesDistPath, './package.json') 17 const typesDistPackageJsonPath = resolve(typesDistPath, './package.json')
@@ -23,6 +21,9 @@ async function run () {
23 const distTsConfig = await readJson(distTsConfigPath) 21 const distTsConfig = await readJson(distTsConfigPath)
24 const clientPackageJson = await readJson(resolve(cwd(), './client/package.json')) 22 const clientPackageJson = await readJson(resolve(cwd(), './client/package.json'))
25 23
24 await remove(typesDistPath)
25 execSync('npm run tsc -- -b --verbose types', { stdio: 'inherit' })
26
26 const allDependencies = Object.assign( 27 const allDependencies = Object.assign(
27 mainPackageJson.dependencies, 28 mainPackageJson.dependencies,
28 mainPackageJson.devDepencies, 29 mainPackageJson.devDepencies,