cnp-template-typescript
v0.0.0-development
Published
A typescript based template for creating npm packages using TypeScript and VSCode
Downloads
4
Maintainers
Readme
Template to kickstart creating a Node.js module using TypeScript and VSCode
Inspired by node-module-boilerplate
Features
- Commitlint
- Changesets
- Issue Templates
- GitHub Actions
- Codecov
- VSCode Launch Configurations
- TypeScript
- Husky
- Lint Staged
- Jest
- ESLint
- Prettier
Getting started
Set up your repository
Click the "Use this template" button.
Alternatively, create a new directory and then run:
npx create-npm-packages --template husehic/cnp-template-typescript --github-username=xxx
Add NPM Token
Add your npm token to your GitHub repository secrets as NPM_TOKEN
.
Add Codecov integration
Enable the Codecov GitHub App here.
Remove everything from here and above
my-package-name
My awesome module
Install
npm install my-package-name
Usage
import { myPackage } from 'my-package-name';
myPackage('hello');
//=> 'hello from my package'
API
myPackage(input, options?)
input
Type: string
Lorem ipsum.
options
Type: object
postfix
Type: string
Default: rainbows
Lorem ipsum.