Rstack Library starter template
August 17, 2026 ยท View on GitHub
Setup
Install the dependencies:
pnpm install
Get started
Build the library:
pnpm run build
Build for the web
pnpm run build:docs
Build the library in watch mode:
pnpm run dev
Build the library with Web in watch mode:
pnpm run dev:docs
Run tests:
pnpm run test
Run tests in watch mode:
pnpm run test:watch
Inspect the configs of Rslib projects
pnpm run inspect
Development Environment
This template uses Biome as the default formatter.
VSCode Configuration
The .vscode/settings.json sets Biome as the formatter for this project only.
This does not affect your global VSCode configuration or other projects.
If you use Prettier globally, it will continue to work for other projects.
TypeScript Configuration
Separate tsconfig files for different purposes:
tsconfig.node.json- Bundlertsconfig.rslib.json- Library bundlingtsconfig.rsbuild.json- Demo/documentation sitetsconfig.rstest.json- Testing
Performance note: exclude patterns should include nested directories and hidden files for optimal type-checking performance: https://github.com/microsoft/TypeScript/wiki/Performance#misconfigured-include-and-exclude
Optional: ๐ช Git Hooks (Recommended for Teams)
If your team wants to enforce linting pre-commit, consider setting up husky and lint-staged:
pnpm add -D husky lint-staged
npx husky install
Then add a pre-commit file to the .husky directory with:
#!/bin/sh
. "$(dirname "\$0")/_/husky.sh"
pnpm exec lint-staged
Alternatively, you can create it with:
npx husky add .husky/pre-commit "pnpm exec lint-staged"
๐๏ธ Safety Measures
This template has "private": true in package.json as a default safety measure.
Before publishing to npm:
- Change
"private": false - Ensure your package name is unique and correct
- Review your
package.jsonmetadata (description, keywords, repository, etc.)
This prevents accidental npm publishes during development.
๐ Checklist
When using this template, follow the checklist to update your info properly.
- Change the author name in LICENSE
- Update package name and metadata in
package.json - Change
umdNameinrslib.config.ts - Set
"private": false(currentlytrueas a safety measure) - Review and adapt
AGENTS.mdfor your project conventions - Clean up the READMEs
- Publish your project.
License
ยฉ2026 by Logue. Licensed under the MIT License.