0.0.1 • Published 7 months ago
modapi v0.0.1
Rollup Boilerplate
A modern boilerplate for building TypeScript libraries with Rollup.
Features
- Rollup for bundling
- TypeScript support with rollup-plugin-typescript2
- Fast bundling with esbuild
- Testing with Jest
- Linting with ESLint
- Code formatting with Prettier
- Git hooks with husky
- TypeScript declaration files
- Watch mode for development
- CommonJS and ES Module outputs
Installation
pnpm install
Scripts
pnpm dev
- Start development in watch modepnpm build
- Build for productionpnpm test
- Run testspnpm coverage
- Run tests with coverage reportpnpm lint
- Lint codepnpm format
- Format codepnpm typecheck
- Check types
Project Structure
.
├── src/ # Source files
├── __tests__/ # Test files
├── dist/ # Built files (generated)
├── types/ # Type declarations (generated)
└── package.json # Project manifest
Building Your Library
- Write your code in the
src
directory - Add tests in the
__tests__
directory - Build your library with
pnpm build
- Publish to npm with
npm publish
License
MIT