diff --git a/jest.config.ts b/jest.config.ts index 31b2bc0..39104cd 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -3,8 +3,7 @@ import type { Config } from '@jest/types' const config: Config.InitialOptions = { preset: 'ts-jest', testEnvironment: 'node', - testPathIgnorePatterns: ['pages'], - coveragePathIgnorePatterns: ['pages', 'dist'] + testPathIgnorePatterns: ['pages'] } export default config diff --git a/package.json b/package.json index e6fcf3d..36acf53 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "bin": "bin/index.js", "scripts": { "dev": "npm run build && ts-node projects/build.ts", - "build": "npm run rimraf && tsc", + "build": "npm run rimraf && tsc -p tsconfig.build.json", "rimraf": "node -e \"require('fs').existsSync('dist') && require('fs').rmSync('dist', { recursive: true, force: true })\"", "lint": "eslint --ext .ts . && prettier --check \"./**/*.ts\"", "lint:fix": "eslint --ext .ts . --fix && prettier --write \"./**/*.ts\"", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..f82e1d7 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["src/**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index bb0046f..0d89232 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,12 +9,11 @@ "lib": ["dom", "ES2019.Array"], "module": "commonjs", "moduleResolution": "node", - "outDir": "dist", "sourceMap": true, "strict": true, "strictPropertyInitialization": false, "exactOptionalPropertyTypes": true, "target": "es5" }, - "include": ["src/**/*"] + "exclude": ["projects/**/*"] }