Skip to content

Commit b921184

Browse files
author
kk.shen
committed
revert README
1 parent b1b5e7f commit b921184

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,62 @@
1-
# generator-node-typescript-webpack
1+
# TypeScript NodeJS Generator
2+
[![Build Status](https://secure.travis-ci.org/ospatil/generator-node-typescript.png?branch=master)](https://travis-ci.org/ospatil/generator-node-typescript)
3+
[![npm version](https://badge.fury.io/js/generator-node-typescript.svg)](http://badge.fury.io/js/generator-node-typescript)
4+
5+
Bonjour! I'm a minimal [Yeoman](http://yeoman.io) generator for creating NodeJS packages using TypeScript. I let you quickly setup a project with latest available tools and best practices.
6+
7+
I use:
8+
9+
- _npm_ - as task runner.
10+
- _jest_ - as [testing and coverage framework](https://facebook.github.io/jest/) to write specs in **TypeScript** itself. You can choose to use _mocha_ or _ava_ instead.
11+
12+
You want to know if you can change any of these? Of course, why not? It is your package after all. I simply get down to business of generating, no questions asked and then quiety get out of the way!
13+
14+
## Usage
15+
16+
Install `generator-node-typescript` globally.
17+
18+
```sh
19+
$npm i -g generator-node-typescript
20+
```
21+
22+
Create a new directory and `cd` into it.
23+
24+
```sh
25+
$mkdir my-new-project && cd $_
26+
27+
```
28+
29+
Run the generator.
30+
31+
```sh
32+
$yo node-typescript
33+
```
34+
35+
You can choose to use _mocha_ as your test framework using command - `$yo node-typescript --mocha`
36+
37+
You can choose to use _ava_ as your test framework using command - `$yo node-typescript --ava`
38+
39+
Generate a new class and test file.
40+
41+
```sh
42+
$yo node-typescript:classlib MyNewClass [--mocha | --ava]
43+
```
44+
45+
## Highlights of the latest release
46+
47+
- I use latest version of **TypeScript**.
48+
- I use [yarn](https://yarnpkg.com) in place of npm if it's available.
49+
- I use _jest_ which is a "batteries-included" testing framework with coverage built-in (optionally _mocha_ or _ava_). **You write tests in TypeScript itself**.
50+
- I use _prettier_ integrated with _tslint_ to provide no-fuss code formatting and linting.
51+
- I need **no global dependencies**. Every dependency such as _TypeScript_ and _tslint_ is installed as local dev dependency allowing you to freely use different versions of these for different packages.
52+
53+
### Integration with VS Code
54+
- I configure `build`, `clean`, `lint`, `coverage`, `format` and `test` tasks that you can run using `Run Task` option.
55+
- You can directly run currently open source file using task `Run current file`. I use [ts-node](https://github.com/TypeStrong/ts-node) to provide this functionality.
56+
- You can debug currently open source file using `Debug file` launch configuration. You can also debug currently open test file using `Debug test` launch configuration without the need of compiling it first. Here is the preview -
57+
58+
![TypeScript debugging in VS Code](./img/vscode-ts-debug.gif)
59+
60+
## License
61+
62+
MIT

0 commit comments

Comments
 (0)