You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-15
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@
4
4
5
5
> For my 1.x release documentation for TypeScript 1.8, refer to [readme file for 1.x release](./README-1x.md).
6
6
7
-
I'm a minimal [Yeoman](http://yeoman.io) generator for creating NodeJS modules using TypeScript. I let you quickly setup a project with latest available tools and best practices.
7
+
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.
8
8
9
9
I use:
10
10
11
11
-_npm_ - as task runner. You can choose to use _gulp_ instead.
12
12
-_tslint_ - as linter for TypeScript source files.
13
-
-_mocha_ - as testing framework to write specs in **TypeScript** itself.
14
-
-_istanbul_ - a JavaScript code coverage tool working on TypeScript files.
13
+
-_ava_ - as [testing framework](https://github.com/avajs/ava) to write specs in **TypeScript** itself. You can choose to use _mocha_ instead.
14
+
-_nyc_ - a JavaScript code coverage tool working on TypeScript files.
15
15
16
-
You want to know if you can change any of these? Of course, why not? It is your module after all. I simply get down to business of generating, no questions asked. Once done, I get out of the way and you can do as you please!
16
+
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. Once done, I get out of the way and you can do as you please!
17
17
18
18
## Usage
19
19
@@ -38,25 +38,31 @@ $yo node-typescript
38
38
39
39
You can choose to use _gulp_ as your build system using command - `$yo node-typescript --gulp`
40
40
41
+
You can choose to use _mocha_ as your test framework using command - `$yo node-typescript --mocha`
42
+
41
43
Run `npm run` for information on available tasks.
42
44
43
45
```sh
44
46
$npm run
45
-
Lifecycle scripts included in node-ts:
47
+
Lifecycle scripts included in node-typescript-demo:
48
+
prepublish
49
+
npm run build
46
50
test
47
-
npm run build && mocha --compilers ts:ts-node/register --recursive test/**/*-spec.ts
- I use _npm_ to fetch type definitions making life so much easier. You can find more information on [https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/](https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/).
87
-
- I use _mocha_ as testing framework as it allows easier test runs from command line. Also, one of the most important things regarding testing is **now you can write tests in TypeScript itself**. The out-of-box configuration includes use of [ts-node](https://github.com/TypeStrong/ts-node) as mocha compiler allowing executing specs written in TypeScript without compiling them first.
93
+
- I use _ava_ which is a [Futuristic JavaScript test runner](https://github.com/avajs/ava) as testing framework (optionally _mocha_). Also, one of the most important things regarding testing is **you can write tests in TypeScript itself**.
94
+
- I use _prettier_ integrated with _tslint_ to provide no-fuss code formatting and linting.
88
95
- 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 modules.
89
-
- I provide test coverage support using _istanbul_.
90
-
- I provide nice integration with [VS Code editor](https://code.visualstudio.com/). I configure `build`, `clean`, `lint`, `coverage` and `test` tasks that you can run using `Run Task` option.
96
+
- I provide test coverage support using _nyc_.
97
+
- I provide nice integration with [VS Code editor](https://code.visualstudio.com/). I configure `build`, `clean`, `lint`, `coverage`, 'prettier' and `test` tasks that you can run using `Run Task` option.
0 commit comments