mirror of
https://github.com/HackPlan/polaris-react.git
synced 2026-04-30 02:05:47 +08:00
Exclude test files in ts builds (#858)
This commit is contained in:
@@ -3,3 +3,4 @@ examples
|
||||
index.*
|
||||
embedded.js
|
||||
sandbox
|
||||
esnext
|
||||
|
||||
@@ -19,7 +19,10 @@ const intermediateBuild = resolvePath(root, './build-intermediate');
|
||||
const mainEntry = resolvePath(intermediateBuild, './index.js');
|
||||
const embeddedEntry = resolvePath(intermediateBuild, './embedded/index.js');
|
||||
|
||||
execSync(`${resolvePath(root, './node_modules/.bin/tsc')} --outDir ${intermediateBuild}`, {
|
||||
const scripts = resolvePath(root, 'scripts');
|
||||
const tsBuild = resolvePath(scripts, 'tsconfig.json');
|
||||
|
||||
execSync(`${resolvePath(root, './node_modules/.bin/tsc')} --outDir ${intermediateBuild} --project ${tsBuild}`, {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
|
||||
7
scripts/tsconfig.json
Normal file
7
scripts/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": [
|
||||
"../src/**/*.test.ts",
|
||||
"../src/**/*.test.tsx"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user