Skip to content

A starter project for creating a npm module written in typescript. Handles build, publish, testing and a few other basics.

Notifications You must be signed in to change notification settings

ammanvedi/typescript-npm-module-starter

Repository files navigation

Typescript NPM Module Template

This project provides a starting point for a npm module written in typescript

It will handle the following

  1. Testing with Jest
  2. Building with tsc
  3. Publishing via Github Actions
  4. Linting with ESLint
  5. Formatting with Prettier
  6. .d.ts file generation

Tour

.github This folder contains the release workflow, it will build test and then release the code to NPM based on the version passed in the action parameter

src Contains all source files, to start there is just a basic index file

src/test The test directory contains test sources

Usage

Update package.json

You will need to update the following entries in package.json

  "name": "update-package-name",
  "author": "UPDATE-you@email.com",
  "license": "UPDATE",
  "keywords": [
    "UPDATE"
  ],

NPM_TOKEN

You will then need to add an environment variable named NPM_TOKEN to your github repository secrets

Enjoy!

About

A starter project for creating a npm module written in typescript. Handles build, publish, testing and a few other basics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published