Skip to content

Commit e61f5e2

Browse files
authored
Merge pull request #19 from get-convex/update-package-scripts
chore: standardize package.json scripts
2 parents aaa6dc3 + 95ff1da commit e61f5e2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@
2020
"dev": "run-p -r 'dev:*'",
2121
"dev:backend": "convex dev --typecheck-components --run example:seedData",
2222
"dev:frontend": "cd example && vite --clearScreen false",
23-
"dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'convex codegen --component-dir ./src/component && npm run build' --initial",
24-
"predev": "path-exists .env.local || (convex dev --skip-push && npm run build)",
25-
"clean": "rm -rf dist *.tsbuildinfo",
23+
"dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'npm run build:codegen' --initial",
24+
"predev": "path-exists .env.local dist || (npm run build && convex dev --once)",
2625
"build": "tsc --project ./tsconfig.build.json && ./scripts/replace-version.sh .",
26+
"build:codegen": "npx convex codegen --component-dir ./src/component && npm run build",
27+
"build:clean": "rm -rf dist *.tsbuildinfo && npm run build:codegen",
2728
"typecheck": "tsc --noEmit && tsc -p example && tsc -p example/convex",
2829
"lint": "eslint .",
2930
"all": "run-p -r 'dev:*' 'test:watch'",
3031
"test": "vitest run --typecheck",
3132
"test:watch": "vitest --typecheck --clearScreen false",
3233
"test:debug": "vitest --inspect-brk --no-file-parallelism",
3334
"test:coverage": "vitest run --coverage --coverage.reporter=text",
34-
"prepublishOnly": "npm run clean && npm run build",
35-
"preversion": "npm run clean && npm ci && npm run build && run-p test lint typecheck",
35+
"preversion": "npm ci && npm run build:clean && run-p test lint typecheck",
36+
"prepublishOnly": "npm whoami || npm login",
3637
"alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags",
3738
"release": "npm version patch && npm publish && git push --follow-tags && git push",
3839
"version": "vim -c 'normal o' -c 'normal o## '$npm_package_version CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md"

0 commit comments

Comments
 (0)