Skip to content

Commit b73bc23

Browse files
Add bump script
1 parent 0a1d309 commit b73bc23

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@
2929
"build:cjs": "rimraf dist && tsc && copyfiles -u 1 src/**/*.d.ts dist",
3030
"build:esm": "rimraf temp-esm && tsc -p tsconfig.esm.json --outDir temp-esm && node -e \"require('fs').readdirSync('temp-esm').forEach(f=>{if(f.endsWith('.js')){require('fs').copyFileSync('temp-esm/'+f,'dist/'+f.replace('.js','.mjs'));} if(f.endsWith('.js.map')){require('fs').copyFileSync('temp-esm/'+f,'dist/'+f.replace('.js.map','.mjs.map'));}});\" && rimraf temp-esm",
3131
"build": "pnpm i && pnpm run build:cjs && pnpm run build:esm",
32+
"bump": "pnpm precommit && npm version patch",
3233
"docs": "rimraf docs && typedoc --options typedoc.json --readme none",
3334
"lint": "eslint src/**/*.ts",
34-
"precommit": "pnpm i && concurrently \"pnpm:lint\" \"pnpm:test\" && concurrently \"pnpm:build:*\" && git status -s",
35-
"prepublishOnly": "pnpm run build && pnpm run test",
35+
"precommit": "pnpm i && concurrently \"pnpm:lint\" \"pnpm:test\" && concurrently \"pnpm:build:*\" && pnpm run validate && git status -s",
36+
"prepublishOnly": "pnpm run build && pnpm run validate && pnpm run test",
3637
"preversion": "concurrently \"pnpm:lint\" \"pnpm:test\"",
3738
"postversion": "git push && git push --tags && pnpm run docs && git add -A && git commit -m \"Updated docs.\" docs && git push",
38-
"test": "mocha -r ts-node/register tests/**/*.ts"
39+
"test": "mocha -r ts-node/register tests/**/*.ts",
40+
"validate": "node ./.build/validate-package.js"
3941
},
4042
"repository": {
4143
"type": "git",

0 commit comments

Comments
 (0)