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
A simple generator that is independent from any language. Create custom boilerplate, scaffolding, skeleton, and templating code files that you need to create over and over again. All you need is [NodeJS](https://nodejs.org) installed to get started.
5
+
A simple generator that is independent of any language. Create custom boilerplate, scaffolding, skeleton, and templating code files that you need to create over and over again. All you need is [NodeJS](https://nodejs.org) installed to get started.
6
6
7
7
> Find this useful? Give it a :star:
8
8
@@ -184,14 +184,24 @@ Below is an example of a `IReplacerSlotQuestion`
184
184
-`question` - The question to ask the use what value should be used for the replacer `slot`
185
185
-`slot` - The string value for the [Replacer Slots](#replacer-slots-or-ireplacerslotquestion)
186
186
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`:
[Case Converters](#case-converters) transform the string value entered upon use of the generator.
190
200
191
201
Example
192
202
193
203
- In the generator template `__replacerSlot__` is appended by the `(pascalCase)` converter such as `__replacerSlot__(pascalCase)`.
194
-
- When the generator is run, the string `"product reducer"` is provided for `__replacerSlot__`.
204
+
- When the generator is ran, the string `"product reducer"` is provided for `__replacerSlot__`.
195
205
- As a result, the converter will produce `ProductReducer`.
196
206
197
207
Here is the string `Lives down BY the River` with each of the converters:
@@ -213,6 +223,32 @@ One Rule: no spaces between the [Replacer Slots](#replacer-slots-or-ireplacerslo
213
223
-:white_check_mark:`__name__(camelCase)`
214
224
-:warning:`__name__ (camelCase)`
215
225
226
+
## Command Line Usage
227
+
228
+
You can use `generate-template-files` with the command line to generate your template files.
229
+
230
+
When using the command line `stringReplacers` will be ignored, and the arguments pass in will be used. Example: `__name__=some-name`. `dynamicReplacers` are still used with the command line.
-`node ./tools/generate.js` - Runs the `generate-template-files` library
247
+
-`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
248
+
-`__name__=some-name` - Are [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) and will be converted to `{ slot: "__name__", slotValue: "some-name" }`
249
+
-`--outputpath=./src/here` - Will override the `output.path` in the [IConfigItem](#iconfigitem)
250
+
-`--overwrite` - Will overwrite files if the files already exists
0 commit comments