Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rstack Library starter template

TypeScript pnpm Rsbuild Rsblib X Follow GitHub Sponsors

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

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 - Bundler
  • tsconfig.rslib.json - Library bundling
  • tsconfig.rsbuild.json - Demo/documentation site
  • tsconfig.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:

  1. Change "private": false
  2. Ensure your package name is unique and correct
  3. Review your package.json metadata (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 umdName in rslib.config.ts
  • Set "private": false (currently true as a safety measure)
  • Review and adapt AGENTS.md for your project conventions
  • Clean up the READMEs
  • Publish your project.

License

©2026 by Logue. Licensed under the MIT License.

About

Starter template for Library using @web-infra-dev's rsbuild, rslib, rslint, rstest stack.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages