Skip to content

Full featured NPM package template with pre-commit hooks and github actions set up

License

Notifications You must be signed in to change notification settings

KennanHunter/npm-package-template

Repository files navigation

For almost everything, just replace kennanhunter with your username, @kennanhunter/npm-package-template with your npm name (line 20 + 21 of readme.md), and npm-package-template with your repo name

For github actions add

  • NPM_TOKEN: found in access tokens on your npm settings
  • CODECOV_TOKEN: found in code coverage

Always remember grug's timeless advice on testing

You also will want to change the funding key in package.json and the ko-fi key in FUNDING.yml to your financial details

NPM Package Template

GitHub Workflow Status NPM Downloads NPM License Code coverage

Usage

Installing

# npm
npm install @kennanhunter/npm-package-template
# Yarn
yarn add @kennanhunter/npm-package-template

Adding

import { add } from "@kennanhunter/npm-package-template";

const res = add(5, 7);

console.log(res); // 13

Developing

git clone https://github.com/KennanHunter/npm-package-template.git
cd npm-package-template

yarn
yarn test

# Benchmarking (builds in background)
yarn benchmark

# Only needed for final publishing
yarn build

There exists recommended extensions and basic settings in the .vscode folder.

About

Full featured NPM package template with pre-commit hooks and github actions set up

Resources

License

Stars

Watchers

Forks

Sponsor this project