To scaffold a Node.js module or any project written in TypeScript.
Please make sure that you have the following dependencies installed and setup correctly:-
- Node.js >=
8.16.0
- NPM >=
6.4.1
- TypeScript >=
3.0.1
(No guarantee it will work below the version specified here) - TSLint >=
5.11.0
(No guarantee it will work below the version specified here) - TSLint extension for your favorite text editor
First, install generator-node-tsnext
using NPM (we assume you have pre-installed Node.js).
# Install globally with NPM
$ npm install -g yo generator-node-tsnext
Then generate your new project:
# Create a new directory if you haven't already.
# Then change to that new directory.
$ mkdir my-app && cd my-app
# Init
$ yo node-tsnext
NPX comes in a package as of Node.js v8.9.0
. This means that you can run any CLI written in Node.js without globally installing it.
# Create a new directory if you haven't already.
# Then change to that new directory.
$ mkdir my-app && cd my-app
# Install packages with NPX and execute the CLI with this one-liner
$ npx -p yo -p generator-node-tsnext -- yo node-tsnext
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
MIT License © Rong Sen Ng