Skip to content

Commit 505bc68

Browse files
committed
Merge pull request #40 from angularity/upgrade-plugin-registry-0.1.3
change `plugin-registry` version v0.1.1 --> v0.1.3
2 parents 00a764e + d37be1a commit 505bc68

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,15 @@ pluginRegistry
4949
.add(defaultTaskPlugins)
5050
.add(configTaskPlugins);
5151

52-
var taskPlugins = pluginRegistry
52+
pluginRegistry
5353
.get('angularity')
54-
.getAllOfCategory('task');
55-
56-
taskPlugins
57-
.forEach(function eachTaskPlugin(pluginDefinition) {
58-
var plugin = require(pluginDefinition.requirePath);
54+
.getAllOfCategory('task')
55+
.forEach(function eachTaskPlugin(definition) {
56+
var plugin = definition.plugin;
5957

6058
// Task plugins are expected to export a function which should be called with an instance of taskYargsRun
6159
if (typeof plugin !== 'function') {
62-
throw new Error('Plugin named ' + pluginDefinition.name + ' does not export a function');
60+
throw new Error('Plugin named ' + definition.name + ' does not export a function');
6361
}
6462

6563
var taskDefinition = plugin({

npm-shrinkwrap.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)