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
configure whether plugins should be nested or not. (#126)
* configure whether plugins should be nested or not.
* rename nesting to scoped.
* document the npm scoped config option
* rename option to maintainScope
* fix typos
* add in specific error message about duplicate package names
Copy file name to clipboardExpand all lines: README.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,8 @@ gulpLoadPlugins({
67
67
lazy:true, // whether the plugins should be lazy loaded on demand
68
68
rename: {}, // a mapping of plugins to rename
69
69
renameFn:function (name) { ... }, // a function to handle the renaming of plugins (the default works)
70
-
postRequireTransforms: {} // see documentation below
70
+
postRequireTransforms: {}, // see documentation below
71
+
maintainScope:true// toggles loading all npm scopes like non-scoped packages
71
72
});
72
73
```
73
74
@@ -136,12 +137,22 @@ Note that if you specify the `renameFn` options with your own custom rename func
136
137
137
138
## npm Scopes
138
139
139
-
`gulp-load-plugins` comes with [npm scope](https://docs.npmjs.com/misc/scope) support. The major difference is that scoped plugins are accessible through an object on `plugins` that represents the scope. For example, if the plugin is `@myco/gulp-test-plugin` then you can access the plugin as shown in the following example:
140
+
`gulp-load-plugins` comes with [npm scope](https://docs.npmjs.com/misc/scope) support. By default, the scoped plugins are accessible through an object on `plugins` that represents the scope. When `maintainScope = false`, the plugins are available in the top level just like any other non-scoped plugins.
141
+
142
+
For example, if the plugin is `@myco/gulp-test-plugin` then you can access the plugin as shown in the following example:
thrownewError('Could not define the property "'+requireName+'", you may have repeated dependencies in your package.json like'+' "gulp-'+requireName+'" and '+'"'+requireName+'"');
96
+
err=maintainScope ?
97
+
'Could not define the property "'+requireName+'", you may have repeated dependencies in your package.json like'+' "gulp-'+requireName+'" and '+'"'+requireName+'"' :
98
+
'Could not define the property "'+requireName+'", you may have repeated a dependency in another scope like'+' "gulp-'+requireName+'" and '+'"@foo/gulp-'+requireName+'"';
0 commit comments