Skip to content

Commit 0736ba0

Browse files
committed
fix: generate assets on pre-commit
1 parent 269b982 commit 0736ba0

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

.github/workflows/release-please.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
# this assumes that you have created a personal access token
19+
# (PAT) and configured it as a GitHub action secret named
20+
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
21+
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
22+
# this is a built-in strategy in release-please, see "Action Inputs"
23+
# for more options
24+
release-type: simple

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dist/
99

1010
# Coverage directory used by tools like istanbul
1111
.nyc_output
12-
coverage.*
1312
dist
1413

1514
# Log files

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
pnpm run check-types
22
lint-staged
3+
pnpm run test
4+
git add assets

assets/coverage.svg

Lines changed: 1 addition & 0 deletions
Loading

package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@
1515
"analyze:js": "eslint ./src",
1616
"format:js": "eslint --fix",
1717
"check-types": "tsc --noEmit",
18-
"prebuild": "rm -rf ./dist",
19-
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
20-
"postbuild": "echo '{\"type\": \"module\"}' > dist/esm/package.json&&echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json&&pnpm run gen-size-badge",
21-
"pretest": "pnpm run build",
22-
"test": "node --test ./test/import*.*js&&c8 node --import tsx --test ./test/*.test.*",
23-
"posttest": "pnpm run gen-coverage-badge",
18+
"build": "rm -rf ./dist&&tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json&&echo '{\"type\": \"module\"}' > dist/esm/package.json&&echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json&&pnpm run gen-size-badge",
19+
"test": "pnpm run build&&node --test ./test/import*.*js&&c8 node --import tsx --test ./test/*.test.*&&pnpm run gen-coverage-badge",
2420
"test-watch": "pnpm run build&&node --import tsx --test --watch ./test/*.test.*",
2521
"gen-coverage-badge": "node --import tsx ./scripts/genCoverageBadge.ts",
2622
"gen-size-badge": "node --import tsx ./scripts/genSizeBadges.ts"

0 commit comments

Comments
 (0)