diff --git a/package.json b/package.json index 3a046f0..e9243aa 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,11 @@ "dev": "run-p -r 'dev:*'", "dev:backend": "convex dev --typecheck-components", "dev:frontend": "cd example && vite --clearScreen false", - "dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'npx convex codegen --component-dir ./src/component && npm run build' --initial", - "predev": "path-exists .env.local || (npm run build && convex dev --skip-push)", - "clean": "rm -rf dist *.tsbuildinfo", + "dev:build": "chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'npm run build:codegen' --initial", + "predev": "path-exists .env.local dist || (npm run build && convex dev --once)", "build": "tsc --project ./tsconfig.build.json", + "build:codegen": "npx convex codegen --component-dir ./src/component && npm run build", + "build:clean": "rm -rf dist *.tsbuildinfo && npm run build:codegen", "typecheck": "tsc --noEmit && tsc -p example && tsc -p example/convex", "lint": "eslint .", "all": "run-p -r 'dev:*' 'test:watch'", @@ -28,8 +29,8 @@ "test:watch": "vitest --typecheck --clearScreen false", "test:debug": "vitest --inspect-brk --no-file-parallelism", "test:coverage": "vitest run --coverage --coverage.reporter=text", - "prepublishOnly": "npm run clean && npm run build", - "preversion": "npm run clean && npm ci && npm run build && run-p test lint typecheck", + "preversion": "npm ci && npm run build:clean && run-p test lint typecheck", + "prepublishOnly": "npm whoami || npm login", "alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags", "release": "npm version patch && npm publish && git push --follow-tags", "version": "vim -c 'normal o' -c 'normal o## '$npm_package_version CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md"