Skip to content

Commit 5dfefff

Browse files
authored
Merge pull request #220 from get-convex/update-package-scripts
chore: standardize package.json scripts
2 parents 23171b0 + 96242ca commit 5dfefff

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,23 @@
2121
"dev": "run-p -r 'dev:*'",
2222
"dev:backend": "convex dev --typecheck-components",
2323
"dev:frontend": "cd example && vite --clearScreen false",
24-
"dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'convex codegen --component-dir ./src/component && npm run build' --initial",
25-
"predev": "path-exists .env.local || (npm run build && convex dev --once)",
26-
"clean": "rm -rf dist *.tsbuildinfo",
24+
"dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'npm run build:codegen' --initial",
25+
"predev": "path-exists .env.local dist || (npm run build && convex dev --once)",
2726
"build": "tsc --project ./tsconfig.build.json",
27+
"build:codegen": "npx convex codegen --component-dir ./src/component && npm run build",
28+
"build:clean": "rm -rf dist *.tsbuildinfo && npm run build:codegen",
2829
"typecheck": "tsc --noEmit && tsc -p example && tsc -p example/convex",
2930
"lint": "eslint .",
3031
"all": "run-p -r 'dev:*' 'test:watch'",
3132
"test": "vitest run --typecheck",
3233
"test:watch": "vitest --typecheck --clearScreen false",
3334
"test:debug": "vitest --inspect-brk --no-file-parallelism",
3435
"test:coverage": "vitest run --coverage --coverage.reporter=text",
35-
"prepare": "npm run build",
36-
"alpha": "npm run clean && npm ci && run-p test lint typecheck && npm version prerelease --preid alpha && npm publish --tag alpha && git push --tags",
37-
"release": "npm run clean && npm ci && run-p test lint typecheck && npm version patch && npm publish && git push --tags",
38-
"version": "pbcopy <<<$npm_package_version; vim CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md"
36+
"preversion": "npm ci && npm run build:clean && run-p test lint typecheck",
37+
"prepublishOnly": "npm whoami || npm login",
38+
"alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags",
39+
"release": "npm version patch && npm publish && git push --follow-tags",
40+
"version": "vim -c 'normal o' -c 'normal o## '$npm_package_version CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md"
3941
},
4042
"files": [
4143
"dist",

0 commit comments

Comments
 (0)