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**
|
- **Build Process**
|
||||||
- Use TypeScript compiler (`tsc`) for building the project
|
- Use TypeScript compiler (`tsc`) for building the project
|
||||||
- Use `@vercel/ncc` for bundling the code into a single file
|
- Use Rollup for bundling the code
|
||||||
- Run `npm run build` to compile TypeScript files
|
- Run `npm run package` to bundle the code with Rollup
|
||||||
- Run `npm run pack` to bundle the code with ncc
|
- Run `npm run all` to format, lint, test, and package the project
|
||||||
- Run `npm run all` to build, format, lint, pack, and test the project
|
|
||||||
- Note that dist/index.js updates are handled by GitHub Actions and should not be included in commits or pull requests
|
- Note that dist/index.js updates are handled by GitHub Actions and should not be included in commits or pull requests
|
||||||
|
|
||||||
## Git Workflow
|
## Git Workflow
|
||||||
|
|||||||
7
.github/workflows/dist.yml
vendored
7
.github/workflows/dist.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pack:
|
package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check out repository code
|
- name: check out repository code
|
||||||
@@ -16,12 +16,9 @@ jobs:
|
|||||||
- name: format TypeScript code
|
- name: format TypeScript code
|
||||||
run: |
|
run: |
|
||||||
npm run format
|
npm run format
|
||||||
- name: compile TypeScript code
|
|
||||||
run: |
|
|
||||||
npm run build
|
|
||||||
- name: compile TypeScript code into dist/index.js
|
- name: compile TypeScript code into dist/index.js
|
||||||
run: |
|
run: |
|
||||||
npm run pack
|
npm run package
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "chore(build): automated change"
|
commit_message: "chore(build): automated change"
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/*.ts",
|
||||||
"lint": "eslint src/**/*.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": "vitest --run",
|
||||||
"test:coverage": "vitest --run --coverage",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user