https://github.com/JS-DevTools/template-node-typescript
Template repo for Node.js projects written in TypeScript
https://github.com/JS-DevTools/template-node-typescript
cli javascript library nodejs template typescript
Last synced: 6 months ago
JSON representation
Template repo for Node.js projects written in TypeScript
- Host: GitHub
- URL: https://github.com/JS-DevTools/template-node-typescript
- Owner: JS-DevTools
- License: mit
- Created: 2019-06-15T11:16:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T22:45:06.000Z (over 5 years ago)
- Last Synced: 2025-06-10T15:11:29.513Z (8 months ago)
- Topics: cli, javascript, library, nodejs, template, typescript
- Language: JavaScript
- Homepage:
- Size: 77.1 KB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
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:
|Placeholder |Description
|:----------------------------------|:------------------------------------------------------------
|`MyGitHubOrg` |The GitHub org for this repository, such as "JS-DevTools".
|`my-repo-name` |The GitHub repo name
|`MyTwitterAccount` |The Twitter account associated with this project, such as "JSDevTools".
|`https://my-website.com` |The website for this project, such as "https://jstools.dev".
|`@my-npm-scope` |The NPM scope that the package will be published to, such as "@jsdevtools".
|`my-package-name` |The NPM package name. It should be kebab-cased.
|`my-cli` |The CLI command for this project, if any.
|`myLibrary` |The name of the library's default export, if any. This should be a valid JavaScript identifier name.
|`My Project Name` |The human friendly name of the project that is used in the ReadMe, descriptions, and docs pages
|`The description of my library` |A 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`.