Local Development
Here are some useful commands for working on the project locally.
Installation
To work on the project locally, first clone the repository and run bun install
to install the dependencies.
Building
Vite is used to build both the docs and the script itself, but they are built separately.
Script
Task | Command | Description |
---|---|---|
Build | bun run build | Build the script and save the output to dist/ . |
Preview | bun preview | Start a server to test the script locally. |
Develop | bun dev | Start a development server that will rebuild the script automatically when there are changes. |
Docs
Task | Command | Description |
---|---|---|
Build Docs | bun docs:build | Build the documentation site and save the output to docs/.vitepress/dist/ . |
Preview Docs | bun docs:preview | Start a server to view the documentation site locally. |
Develop Docs | bun docs:dev | Start a development server that will rebuild the site automatically when there are changes. |
Linting / Formatting
Task | Command | Description |
---|---|---|
Format | bun format | Format the codebase using Biome. |
Lint | bun lint | Lint the codebase using Biome. |
Commit | bun commit | Use an interactive prompt to commit changes with Commitizen. |
Hooks
Task | Description |
---|---|
Prepare | Install Git hooks using Husky when the package is installed. |
Post Version | Build the script and save the output to dist/ when the version is updated. |