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
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,12 +89,12 @@ The `generateTemplateFiles` function takes an array of `IConfigItem` items.
89
89
#### `IConfigItem`
90
90
91
91
-`option` - The name of the option to choose when asked.
92
-
-`defaultCase` - The default [Case Converters](#case-converters) to use with the [Replacer Slots](#replacer-slots) in the template files. Default is `(noCase)`.
92
+
-`defaultCase` - The default [Case Converters](#case-converters) to use with the [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) in the template files. Default is `(noCase)`.
93
93
-`entry.folderPath` - Path to a folder of files or a single template file.
94
94
95
-
-`stringReplacers` - An array of [Replacer Slots](#replacer-slots) used to replace content in the designated `entry.folderPath`.
95
+
-`stringReplacers` - An array of [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) used to replace content in the designated `entry.folderPath`.
96
96
-`dynamicReplacers` - (Optional) An array of IReplacer used to replace content in the designated `entry.folderPath`.
97
-
-`output.path` - The desired output path for generated files. [Case Converters](#case-converters) and [Replacer Slots](#replacer-slots) can be used to make the path somewhat dynamic.
97
+
-`output.path` - The desired output path for generated files. [Case Converters](#case-converters) and [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) can be used to make the path somewhat dynamic.
98
98
-`output.pathAndFileNameDefaultCase` - The [Case Converters](#case-converters) to use for the file path and file name(s).
99
99
-`onComplete` - (Optional) Takes a callback function that is called once the file(s) have been outputted. A [IResults](#iresults) object will be passed to the callback.
100
100
@@ -124,13 +124,13 @@ The `generateTemplateFiles` function takes an array of `IConfigItem` items.
124
124
125
125
#### `IResults`
126
126
127
-
Below is an example of what you receive from the `onComplete` callback. It has the output path, list of files created and the [Replacer Slots](#replacer-slots) with the value entered.
127
+
Below is an example of what you receive from the `onComplete` callback. It has the output path, list of files created and the [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) with the value entered.
128
128
129
129
-`output.path` - The file(s) output path
130
130
-`output.files` - List of files created
131
-
-`stringReplacers` - List of [Replacer Slots](#replacer-slots); name and values entered during the setup process
131
+
-`stringReplacers` - List of [Replacer Slots](#replacer-slots-or-ireplacerslotquestion); name and values entered during the setup process
132
132
133
-
###### Example data you would get from the onComplate callback
133
+
###### Example data you would get from the onComplete callback
134
134
135
135
```javascript
136
136
{
@@ -161,7 +161,7 @@ Below is an example of what you receive from the `onComplete` callback. It has t
161
161
162
162
### Replacer Slots or IReplacerSlotQuestion
163
163
164
-
[Replacer Slots](#replacer-slots) are unique string value(s) to be replaced by the generator. An array of string values and/or `IReplacerSlotQuestion` objects can be used.
164
+
[Replacer Slots](#replacer-slots-or-ireplacerslotquestion) are unique string value(s) to be replaced by the generator. An array of string values and/or `IReplacerSlotQuestion` objects can be used.
165
165
166
166
```javascript
167
167
stringReplacers: ['__store__', {question:'Insert model name', slot:'__model__'}];
@@ -197,7 +197,7 @@ Here is the string `Lives down BY the River` with each of the converters:
197
197
(snakeCase) // lives_down_by_the_river
198
198
(titleCase) // Lives Down By The River
199
199
200
-
One Rule: no spaces between the [Replacer Slots](#replacer-slots) and [Case Converters](#case-converters). If there is a space, [Case Converters](#case-converters) will not work.
200
+
One Rule: no spaces between the [Replacer Slots](#replacer-slots-or-ireplacerslotquestion) and [Case Converters](#case-converters). If there is a space, [Case Converters](#case-converters) will not work.
0 commit comments