refactor(ci): rename npm script from pack to package and update workflow
This commit is contained in:
@@ -52,10 +52,9 @@ This document outlines the development guidelines and best practices for our Typ
|
||||
|
||||
- **Build Process**
|
||||
- Use TypeScript compiler (`tsc`) for building the project
|
||||
- Use `@vercel/ncc` for bundling the code into a single file
|
||||
- Run `npm run build` to compile TypeScript files
|
||||
- Run `npm run pack` to bundle the code with ncc
|
||||
- Run `npm run all` to build, format, lint, pack, and test the project
|
||||
- Use Rollup for bundling the code
|
||||
- Run `npm run package` to bundle the code with Rollup
|
||||
- Run `npm run all` to format, lint, test, and package the project
|
||||
- Note that dist/index.js updates are handled by GitHub Actions and should not be included in commits or pull requests
|
||||
|
||||
## Git Workflow
|
||||
|
||||
7
.github/workflows/dist.yml
vendored
7
.github/workflows/dist.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
pack:
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check out repository code
|
||||
@@ -16,12 +16,9 @@ jobs:
|
||||
- name: format TypeScript code
|
||||
run: |
|
||||
npm run format
|
||||
- name: compile TypeScript code
|
||||
run: |
|
||||
npm run build
|
||||
- name: compile TypeScript code into dist/index.js
|
||||
run: |
|
||||
npm run pack
|
||||
npm run package
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore(build): automated change"
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"pack": "npx rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
||||
"package": "npx rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
||||
"test": "vitest --run",
|
||||
"test:coverage": "vitest --run --coverage",
|
||||
"all": "npm run format && npm run lint && npm run test:coverage && npm run pack"
|
||||
"all": "npm run format && npm run lint && npm run test:coverage && npm run package"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -58,4 +58,4 @@
|
||||
"vite": "^6.3.4",
|
||||
"vitest": "^3.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user