diff --git a/package.json b/package.json index fcff31a..cfab1f7 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,9 @@ "type": "module", "scripts": { "dev": "cd examples/react && npm run dev", - "clean": "rm -rf dist *.tsbuildinfo", "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 examples/next && tsc -p examples/next/convex && tsc -p examples/react && tsc -p examples/react/convex && tsc -p examples/tanstack && tsc -p examples/tanstack/convex", "lint": "eslint .", "all": "run-p -r 'dev' 'test:watch'", @@ -28,12 +29,10 @@ "test:watch": "vitest --typecheck --clearScreen false", "test:debug": "vitest --inspect-brk --no-file-parallelism", "test:coverage": "vitest run --coverage --coverage.reporter=text", - "check-npm-auth": "npm whoami 2>/dev/null || (echo 'Error: You must be logged in to npm to publish. Run `npm login` first.' && exit 1)", - "prepublishOnly": "npm run check-npm-auth && 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", - "prerelease": "npm run check-npm-auth", "version": "vim -c 'normal o' -c 'normal o## '$npm_package_version CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md" }, "files": [