README.md

Template NPM Package

Template for a new NPM package powered by TypeScript and ESLint with docs generated using TypeDoc.

Pre-Flight

Look at the following before begining development.

Repo Environment

In your repo's environment settings, create a new environment called Deploy. This is the environment that contains your NPM Key and Node Target Version during deployment of your packages. Make a new secret called NPM_TOKEN with an NPM Token (see NPM Docs for help). In your repo's full environment settings, create a new variable called NODE_VERSION and set it to be whatever version of node your deployment build should target.

Pages

If you would like to deploy your docs to GutHub Pages, initiate pages in your repo settings to use GitHub Actions. This should be all the config you need.

README and hard references.

Make sure you update the README and references. If your editor supports find and replace, some --tags-- are standardized for an easier time updating things like workflows and other important references. Tags are as follows, and should be replaced in order:

Tag What For
--package-repo-- Repo of the package.
--package-name-- Name of the package.
--package-author-- Name of the package.
--package-description-- Description of the package.

Badges

Use shields.io to generate some badges.

These are the badges shipped with this template:

NPM Version NPM Downloads License

Release Tags

By default, this module starts at version 0.1.0-beta.1 with the beta tag. When you wish to move to release, remove the --tag=beta paramaters from ci.yml and update your version accordingly.

What Now?

Remove everything above the line from your README, and your good to go.


--package-name--

--package-description--

NPM Version NPM Downloads License

Install

Install --package-name-- via your favorite package manager, I would assume.

npm install --package-name--
yarn add --package-name--

Usage

Include in your project, probably.

// Import the package.
import package from "--package-name--";

// Show your examples
package.doSomething();
package.doSomethingElse();

Config

Package can be configed, somehow.

// Import your package.
import package from "--package-name--";

// Configure your package.
package.configure({
  foo: "bar",
  fiz: ["baz", "some_other_option"],
});

// Show your examples.
package.doSomething();
package.doSomethingElse();

Config Options

Name Type Default Description
configOption1 int 255 Option 1 Description
configOption2 string[] string1, string2 Option 2 Description
configOption3 boolean false Option 3 Description

Contributing

Clone the repository, and run npm i or yarn to install the dependancies. Lint the module with the lint script in package.json, build the module with build, and run module tests with test.

Workflow tests require act. You do not need this for module development, as workflow tests are not run during CI.