1.0.1 • Published 7 years ago

generator-node-ts v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

node-ts generator

Creates a simple project structure for a node application using typescript. It installs the default node type definition files as well. You can choose to add mocha and chai for testing, via a prompt.

Installation

If you have yeoman installed, simply call (if 'name' is not present, the working folders name will be used):

npm install generator-node-ts [-g]
yo node-ts [name]

You will then be asked, if you like to add testing capabilities to your project (default is false):

Would you like to add mocha and chai (testing)? (y/N)

If you chose to add testing, you are then able to choose if you prefer to have your specs in a separate 'test' folder (next to the 'src' folder) or having the specs next to the source files in the 'src' folder.

Should tests be stored in a separate folder, instead of next to the source files?
-yes:
 <your-app>/
   src/
     .ts
   test/
     .spec.ts
-no:
 <your-app>/
   src/
     .ts
     .spec.ts
 (y/N)

npm scripts

The generator comes with the following npm scripts:

npm start

Will transpile the .ts in src folder to .js files in dist folder. And start the node application.

npm test

Only available if you enabled testing! This will also transpile all .ts files and will run mocha tests on all .spec.js files in the dist folder.

Generated folder structure

1.0.1

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago