Skip to content

Template repo for Node.js projects written in TypeScript

License

Notifications You must be signed in to change notification settings

JS-DevTools/template-node-typescript

Repository files navigation

Node.js TypeScript Template

This is a template repo for Node.js projects written in TypeScript. This template works for libraries and/or CLIs.

Step 1: Copy this repo

Create a new git repo and copy the contents of this repo into it.

Step 2: Delete unneeded files

If you don't need a CLI, then:

  • Delete the following files and directories:
    • bin
    • src/cli
    • test/specs/cli.spec.js
    • test/utils/my-cli.js
  • Delete the following fields in package.json:
    • bin
    • files.bin
    • devDependencies.chai-exec
    • devDependencies.@types/command-line-args
    • dependencies.command-line-args
  • Delete the Run CLI config from .vscode/launch.json

Step 3: Replace placeholders

Replace all occurrences of the following placeholders in all files:

PlaceholderDescription
MyGitHubOrgThe GitHub org for this repository, such as "JS-DevTools".
my-repo-nameThe GitHub repo name
MyTwitterAccountThe Twitter account associated with this project, such as "JSDevTools".
https://my-website.comThe website for this project, such as "https://jstools.dev".
@my-npm-scopeThe NPM scope that the package will be published to, such as "@jsdevtools".
my-package-nameThe NPM package name. It should be kebab-cased.
my-cliThe CLI command for this project, if any.
myLibraryThe name of the library's default export, if any. This should be a valid JavaScript identifier name.
My Project NameThe human friendly name of the project that is used in the ReadMe, descriptions, and docs pages
The description of my libraryA short, human friendly description of the project that is used in the ReadMe and package.json

Step 4: TODOs

Find all "TODO" notes in the code and follow their instructions.

Step 5: ReadMe

Delete this file and replace it with README_md.

About

Template repo for Node.js projects written in TypeScript

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published