diff --git a/package.json b/package.json index 8d4a5100ad..24c83472db 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "test": "jest", "gen": "bash ./scripts/gc.sh", "bootstrap": "yarn && npx lerna bootstrap", - "build": "yarn bootstrap && yarn build:lib && yarn build:theme && yarn build:esm-bundle && yarn build:esm", + "build": "yarn bootstrap && yarn build:lib && yarn build:theme && yarn build:esm-bundle && yarn build:esm && yarn build:utils && yarn build:locale", "build:lib": "rimraf lib && webpack --config ./build/webpack.config.js", "build:esm-bundle": "rollup --config ./build/rollup.config.bundle.js", "build:esm": "node ./build/bincomp.js", - "build:utils": "cd ./packages/utils && npx tsc && cd ../", + "build:utils": "npx tsc -p packages/utils", + "build:locale": "npx tsc -p packages/locale", "build:theme": "rimraf packages/theme-chalk/lib && gulp build --gulpfile packages/theme-chalk/gulpfile.js && cp-cli packages/theme-chalk/lib lib/theme-chalk && rimraf packages/theme-chalk/lib", "lint": "eslint ./packages --ext .vue,.js,.ts", "lint-fix": "eslint --fix ./packages --ext .vue,.js,.ts", diff --git a/packages/locale/tsconfig.json b/packages/locale/tsconfig.json new file mode 100644 index 0000000000..a3b4b6c8eb --- /dev/null +++ b/packages/locale/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "ESNext", + "declaration": false, + "noImplicitAny": false, + "removeComments": true, + "moduleResolution": "node", + "esModuleInterop": true, + "jsx": "preserve", + "noLib": false, + "target": "es6", + "sourceMap": false, + "lib": [ + "ESNext", "DOM" + ], + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": true, + "allowUnusedLabels": true, + "outDir": "../../lib/locale" + }, + "exclude": [ + "node_modules", + "__test__/*.ts" + ] + } diff --git a/packages/utils/global.d.ts b/packages/utils/global.d.ts deleted file mode 100644 index 16a7a12a93..0000000000 --- a/packages/utils/global.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -declare type Nullable = T | null; - -declare type CustomizedHTMLElement = HTMLElement & T - -declare type Indexable = { - [key: string]: T -} - -declare type Hash = Indexable - -declare type TimeoutHandle = ReturnType diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 9a498e12cb..5ebfbcf5e6 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -19,10 +19,11 @@ "outDir": "../../lib/utils" }, "include": [ - "./**/*.ts" + "./**/*.ts", + "../../typings/vue-shim.d.ts" ], "exclude": [ "node_modules", - "packages/**/__tests__/*" + "tests/*.ts" ] }