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
Reflects the changes proposed to `node-plop` to allow all target assets to be loaded using:
```js
plop.load('./plopfiles/component.js', {}, true);
```
The `node-plop` PR can be found here: plopjs/node-plop#187
Copy file name to clipboardExpand all lines: plop-load.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,11 @@ plop.load
18
18
`config` is an object that can be passed to the plopfile or `plop-pack` when they are run. This allows the consumer of the plopfile or `plop-pack` to configure certain aspects of its functionality. To know what properties should be in this object, see the documentation provided by the author.
`include` is an object that can contain 4 properties (`generators`, `helpers`, `partials`, and `actionTypes`). Each of these properties should have an [`IncludeDefinition`](#Interface-IncludeDefinition) as its value. Most of the time this object is not needed because the plopfile or `plop-pack` is able to specify a default [`IncludeDefinition`](#Interface-IncludeDefinition) to be used.
25
+
If `include` is`true` all assets from the target will be included (none if `false`). Otherwise, `include` should be an object that can contain 4 properties (`generators`, `helpers`, `partials`, and `actionTypes`). Each of these properties should have an [`IncludeDefinition`](#Interface-IncludeDefinition) as its value. Most of the time this object is not needed because the plopfile or `plop-pack` is able to specify a default [`IncludeDefinition`](#Interface-IncludeDefinition) to be used.
26
26
27
27
#### Interface `IncludeDefinition`
28
28
-**Boolean:**`true` will include all assets, `false` will include non of them.
@@ -35,6 +35,11 @@ plop.load
35
35
// loads all 5 generators, no helpers, actionTypes or partials (even if they exist)
36
36
plop.load('./plopfiles/component.js');
37
37
```
38
+
*load all assets from a path*
39
+
```javascript
40
+
// loads all 5 generators, all helpers, actionTypes and partials (if they exist)
41
+
plop.load('./plopfiles/component.js', {}, true);
42
+
```
38
43
*load via a path with a custom include config*
39
44
```javascript
40
45
// loads all helpers, no generators, actionTypes or partials (even if they exist)
0 commit comments