Skip to content

Commit ee5e919

Browse files
committed
package script workflow
1 parent 8e02416 commit ee5e919

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
## Running locally
44

55
```sh
6-
npm run setup
6+
npm i
77
npm run dev
88
```
99

1010
## Testing
1111

1212
```sh
1313
npm run clean
14+
npm run build
1415
npm run typecheck
1516
npm run lint
1617
npm run test

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,26 @@
1313
"license": "Apache-2.0",
1414
"type": "module",
1515
"scripts": {
16-
"example": "convex dev --typecheck-components --live-component-sources",
17-
"dev": "run-p -r 'example' 'build:watch'",
18-
"dashboard": "cd example && npx convex dashboard",
19-
"all": "run-p -r 'example' 'build:watch' 'test:watch'",
20-
"setup": "npm i && npm run build && npx convex dev --once",
21-
"build:watch": "cd src && npx chokidar -d 1000 '../tsconfig.json' '**/*.ts' -c 'npm run build' --initial",
22-
"build": "tsc --project ./tsconfig.build.json && npm run copy:dts && echo '{\\n \"type\": \"module\"\\n}' > dist/package.json",
16+
"dev": "run-p -r 'dev:backend' 'dev:frontend' 'build:watch'",
17+
"dev:backend": "convex dev --live-component-sources --typecheck-components",
18+
"dev:frontend": "cd example && vite --clearScreen false",
19+
"predev": "npm run dev:backend -- --until-success",
20+
"clean": "rm -rf dist tsconfig.build.tsbuildinfo",
21+
"build": "tsc --project ./tsconfig.build.json && npm run copy:dts",
2322
"copy:dts": "rsync -a --include='*/' --include='*.d.ts' --exclude='*' src/ dist/ || cpy 'src/**/*.d.ts' 'dist/' --parents",
23+
"build:watch": "npx chokidar 'tsconfig*.json' 'src/**/*.ts' -i '**/*.test.ts' -c 'npm run build' --initial",
2424
"typecheck": "tsc --noEmit && tsc -p example/convex",
25-
"clean": "rm -rf dist tsconfig.build.tsbuildinfo",
26-
"alpha": "npm run clean && npm run build && run-p test lint typecheck && npm version prerelease --preid alpha && npm publish --tag alpha && git push --tags",
27-
"release": "npm run clean && npm run build && run-p test lint typecheck && npm version patch && npm publish && git push --tags && git push",
25+
"lint": "eslint src && eslint example/convex",
26+
"all": "run-p -r 'dev:backend' 'dev:frontend' 'build:watch' 'test:watch'",
2827
"test": "vitest run --typecheck",
29-
"test:watch": "vitest --typecheck",
28+
"test:watch": "vitest --typecheck --clearScreen false",
3029
"test:debug": "vitest --inspect-brk --no-file-parallelism",
3130
"test:coverage": "vitest run --coverage --coverage.reporter=text",
32-
"lint": "eslint src && eslint example/convex",
33-
"version": "pbcopy <<<$npm_package_version; vim CHANGELOG.md && git add CHANGELOG.md"
31+
"attw": "attw $(npm pack -s) --exclude-entrypoints ./convex.config --profile esm-only",
32+
"prepare": "npm run build",
33+
"alpha": "npm run clean && npm ci && run-p test lint typecheck attw && npm version prerelease --preid alpha && npm publish --tag alpha && git push --tags",
34+
"release": "npm run clean && npm ci && run-p test lint typecheck attw && npm version patch && npm publish && git push --tags",
35+
"version": "pbcopy <<<$npm_package_version; vim CHANGELOG.md && prettier -w CHANGELOG.md && git add CHANGELOG.md"
3436
},
3537
"files": [
3638
"dist",

0 commit comments

Comments
 (0)