Skip to content

Commit cd85a77

Browse files
committed
Add Command Line Usage to README
1 parent bbcc182 commit cd85a77

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,30 @@ One Rule: no spaces between the [Replacer Slots](#replacer-slots-or-ireplacerslo
213213
- :white_check_mark: `__name__(camelCase)`
214214
- :warning: `__name__ (camelCase)`
215215

216+
## Command Line Usage
217+
218+
You can use `generate-template-files` with the command line to generate your template files.
219+
220+
###### Minimum Options
221+
222+
```txt
223+
node ./tools/generate.js angular-ngrx-store __name__=some-name
224+
```
225+
226+
###### All Options
227+
228+
```txt
229+
node ./tools/generate.js angular-ngrx-store __name__=some-name __model__=some-other-name --outputpath=./src/here --overwrite
230+
```
231+
232+
**Command LIne Script Overview**
233+
234+
- `node ./tools/generate.js` - Runs the generate-template-files library
235+
- `angular-ngrx-store` is the template name; It uses the same option name in the [IConfigItem](#iconfigitem) but converts all options names to kebab-case. For example `option: 'Angular Ngrx Store'` will be converted to `angular-ngrx-store` when using the command line
236+
- `__name__=some-name` and `__model__=some-other-name` are [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) and will be converted to `{ slot: "__name__", slotValue: "some-name" }`
237+
- `--outputpath=./src/here` - Will override the `output.path` in the [IConfigItem](#iconfigitem)
238+
- `--overwrite` - Will overwrite files if the files already exists
239+
216240
[npm-url]: https://npmjs.org/package/generate-template-files
217241
[downloads-img]: http://img.shields.io/npm/dm/generate-template-files.svg?style=flat-square
218242
[npm-img]: http://img.shields.io/npm/v/generate-template-files.svg?style=flat-square

0 commit comments

Comments
 (0)