Skip to content

Commit

Permalink
build: allow typescript to run on tests (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
huwshimi authored Sep 19, 2024
1 parent 47d1030 commit 5187fb9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
},
"scripts": {
"build": "rm -rf dist && yarn build-local; yarn build-declaration",
"build-local": "NODE_ENV=production babel src --out-dir dist --copy-files --extensions '.js,.jsx,.ts,.tsx'",
"build-declaration": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",
"build-local": "NODE_ENV=production babel src --out-dir dist --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx,.snap' --ignore '**/*.test.ts','**/*.test.tsx','**/*.stories.tsx','**/__snapshots__','src/setupTests.js','src/testing'",
"build-declaration": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json",
"build-watch": "yarn run build-local --watch",
"build-docs": "storybook build -c .storybook -o docs",
"clean": "rm -rf node_modules dist .out",
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"exclude": ["src/**/*.test.*", "src/**/*.stories.*"],
"extends": "./tsconfig.json"
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@
"utils": ["./utils"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
"include": ["src/**/*"]
}

0 comments on commit 5187fb9

Please sign in to comment.