File tree Expand file tree Collapse file tree 3 files changed +73
-2
lines changed Expand file tree Collapse file tree 3 files changed +73
-2
lines changed Original file line number Diff line number Diff line change 33[ ![ npm version] ( https://badge.fury.io/js/ts-auto-mock.svg )] ( https://badge.fury.io/js/ts-auto-mock )
44[ ![ Downloads] ( https://img.shields.io/npm/dw/ts-auto-mock.svg )] ( https://www.npmjs.com/package/ts-auto-mock )
55
6-
76![ slack] ( docs/slack_small.png ) Need help? Join us on [ Slack] ( https://join.slack.com/t/typescripttdd/shared_invite/enQtODk3MjQwNzUwNTk2LTMzNjdlZTNmMmY3Nzg2NDNiZDA1YzJmZjk2NjcwZjQwODQ3YzE5NGZjM2Q4MzZjYWNiMWE4MGU0NjEzM2E5YzE )
87
98A Typescript transformer that will allow you to create mock for any types (Interfaces, Classes, ...) without need to create manual fakes/mocks.
@@ -36,6 +35,10 @@ mock.details // "{phone: 0} "
3635## [ Changelog] ( CHANGELOG.md )
3736
3837## [ Roadmap] ( https://github.com/Typescript-TDD/ts-auto-mock/wiki/Roadmap )
38+
39+ #### Do you want to contribute?
40+ * [ Check how to make changes to the code base] ( https://typescript-tdd.github.io/ts-auto-mock/local-development )
41+
3942## Authors
4043
4144* [ ** Vittorio Guerriero** ] ( https://github.com/uittorio )
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ export default {
1919 { name : 'Types not supported' } ,
2020 { name : 'Config' } ,
2121 { name : 'Performance' } ,
22- { name : 'Definitely Typed' }
22+ { name : 'Definitely Typed' } ,
23+ { name : 'Local development' }
2324 ] ,
2425 repository : "https://github.com/Typescript-TDD/ts-auto-mock"
2526}
Original file line number Diff line number Diff line change 1+ ---
2+ name : Local development
3+ route : /local-development
4+ ---
5+
6+ # Local development
7+
8+ If you want to add a new functionality of fix a bug in ts-auto-mock you are in the right place
9+
10+ ## Pre requisite
11+ - node >= 10
12+ - npm
13+ - the repo cloned locally
14+
15+ ## Install local dependencies
16+ - Make sure you are in the root folder
17+ - run npm install
18+ ```
19+ npm install
20+ ```
21+
22+ ## Build the transformer
23+ - run npm run build
24+ ```
25+ npm run build
26+ ```
27+
28+ ## Make a change
29+ Ts auto mock has multiple modules, each of them has a different meaning and depending of what you are editing you can just re build the specific one
30+ - transformer
31+ - repository
32+ - extension
33+ - merge
34+
35+ If you are editing the transformer
36+
37+ ```
38+ npm run build:transformer
39+ ```
40+
41+ If you are editing anything else
42+ ```
43+ npm run build:modules
44+ ```
45+
46+ ## Test your changes
47+ There are 2 ways to test the effectiveness of your changes
48+ - Use the existing test system
49+ - add a test
50+ - run all the tests
51+ ```
52+ npm run test
53+ // use npm run test:transformer if you are just editing the transformer
54+ ```
55+ - use the Playground
56+ - open the file [ playground.test.ts] ( https://github.com/Typescript-TDD/ts-auto-mock/blob/master/test/playground/playground.test.ts )
57+ - make your changes
58+ - run test playground to see the test passing
59+ ```
60+ npm run test:playground
61+ ```
62+ - run build playground to see the output of the generate code
63+ ```
64+ npm run build:playground
65+ ```
66+
67+ That's it.
You can’t perform that action at this time.
0 commit comments