@anandchowdhary/node.ts
v1.1.1
Published
Opinionated starter for Node.js + TypeScript libraries
Downloads
18
Maintainers
Readme
🏷️ Node.ts
Opinionated starter for server-side Node.js libraries, with TypeScript, tests with Jest, automated releases with GitHub Actions and Semantic Release, and coverage reporting from Travis CI to Coveralls.
⭐ Using Node.ts
Setting up repository
To get started, first generate your new repository. There are two ways to do this:
- Generate a repository with Node.ts template is GitHub's preferred way
- Import this repository keeps the commit history, which you may want
Updating README.md
Make the following changes to this README.md
(note that these changes are case-sensitive):
- Replace "Node.ts" with your project name
- Replace "AnandChowdhary/node.ts" with your GitHub "username/repository"
- Replace "@anandchowdhary/node.ts" with your npm package name
- Replace "@anandchowdhary%2Fnode.ts" with your npm package name, URL-encoded
Updating package.json
Make the following changes to package.json
:
- Replace "@anandchowdhary/node.ts" with your npm package name
- Change the version to "0.0.0" for Semantic Release to take over
- Replace the description with your npm package description
- Replace "AnandChowdhary/node.ts" with your GitHub "username/repository"
- Replace "Anand Chowdhary [email protected]" with you as the author
- Replace "anandchowdhary.github.io" with "username.github.io"
Last steps
- Add your npm token (
NPM_TOKEN
) as a GitHub secret in your repository (more details) - Log in or sign up on Coveralls and add your repository
- Remove this section ("Using Node.ts"), keeping the "Usage" section below
- Replace "AnandChowdhary/eject-dependencies" with your GitHub "username/repository" in
.releaserc.json
- Set up GitHub Pages with
master
branch - Write commits messages using Gitmoji
💡 Usage
Install the package from npm:
npm install @anandchowdhary/node.ts
Import and use;
import { nodeTs } from "@anandchowdhary/node-ts";
nodeTs();
👩💻 Development
Build TypeScript:
npm run build
Run unit tests and view coverage:
npm run test-without-reporting