Skip to content

Commit 03239c7

Browse files
authored
ci(package): build speed improvements (#776)
* build(tsc): fix incremental build * build(tsc): enable smart incremental builds * ci(eslint): enable cache * build(package): run tests before creating package
1 parent c28df72 commit 03239c7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ typings/
8787
# End of https://www.gitignore.io/api/node
8888

8989
dist
90+
tsconfig.tsbuildinfo

Diff for: .lintstagedrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"**/*.{js,ts,md,yml,json,html}": "prettier --write",
3-
"**/*.{js,ts}": "eslint --fix",
3+
"**/*.{js,ts}": "eslint --cache --fix"
44
}

Diff for: package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@
88
"dist"
99
],
1010
"scripts": {
11-
"clean": "rm -rf dist coverage",
11+
"clean": "rm -rf dist coverage tsconfig.tsbuildinfo .eslintcache",
1212
"lint": "yarn prettier && yarn eslint",
1313
"lint:fix": "yarn prettier:fix && yarn eslint:fix",
14-
"eslint": "eslint '{src,test}/**/*.ts'",
14+
"eslint": "eslint '{src,test}/**/*.ts' --cache",
1515
"eslint:fix": "yarn eslint --fix",
1616
"prettier": "prettier --list-different \"**/*.{js,ts,md,yml,json,html}\"",
1717
"prettier:fix": "prettier --write \"**/*.{js,ts,md,yml,json,html}\"",
18-
"prebuild": "yarn clean",
19-
"build": "tsc",
18+
"build": "tsc --build",
2019
"test": "jest",
2120
"coverage": "jest --coverage --coverageReporters=lcov",
2221
"prepare": "husky install",
23-
"prepack": "yarn build && rm dist/tsconfig.tsbuildinfo",
22+
"prepack": "yarn clean && yarn test && yarn build",
2423
"spellcheck": "npx --yes cspell --show-context --show-suggestions '**/*.*'"
2524
},
2625
"repository": {

Diff for: tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"rootDir": "./src",
34
"outDir": "./dist",
45
"lib": ["es2019", "es2020.bigint", "es2020.string", "es2020.symbol.wellknown"],
56
"module": "commonjs",

0 commit comments

Comments
 (0)