Skip to content

Commit 266da01

Browse files
committed
Update README
1 parent cd85a77 commit 266da01

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ Below is an example of a `IReplacerSlotQuestion`
184184
- `question` - The question to ask the use what value should be used for the replacer `slot`
185185
- `slot` - The string value for the [Replacer Slots](#replacer-slots-or-ireplacerslotquestion)
186186

187+
#### Dynamic Replacer Slots
188+
189+
If you have data that is dynamically generated or you have hard coded values you can use the `dynamicReplacers`:
190+
191+
```javascript
192+
dynamicReplacers: [
193+
{slot:'__description__', slotValue: config.description}
194+
],
195+
```
196+
187197
### Case Converters
188198

189199
[Case Converters](#case-converters) transform the string value entered upon use of the generator.
@@ -231,9 +241,9 @@ node ./tools/generate.js angular-ngrx-store __name__=some-name __model__=some-ot
231241

232242
**Command LIne Script Overview**
233243

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" }`
244+
- `node ./tools/generate.js` - Runs the `generate-template-files` library
245+
- `angular-ngrx-store` - 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
246+
- `__name__=some-name` - Are [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) and will be converted to `{ slot: "__name__", slotValue: "some-name" }`
237247
- `--outputpath=./src/here` - Will override the `output.path` in the [IConfigItem](#iconfigitem)
238248
- `--overwrite` - Will overwrite files if the files already exists
239249

0 commit comments

Comments
 (0)