@kadira/storybook-addons
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -17,5 +17,16 @@ "use strict"; | ||
this._panels = {}; | ||
this._channel = null; | ||
} | ||
_createClass(AddonStore, [{ | ||
key: "getChannel", | ||
value: function getChannel() { | ||
return this._channel; | ||
} | ||
}, { | ||
key: "setChannel", | ||
value: function setChannel(channel) { | ||
this._channel = channel; | ||
} | ||
}, { | ||
key: "getPanels", | ||
@@ -37,13 +48,9 @@ value: function getPanels() { | ||
key: "loadAddons", | ||
value: function loadAddons() { | ||
value: function loadAddons(api) { | ||
var _this = this; | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
Object.keys(this._loaders).map(function (name) { | ||
return _this._loaders[name]; | ||
}).forEach(function (loader) { | ||
return loader.apply(undefined, args); | ||
return loader(api); | ||
}); | ||
@@ -50,0 +57,0 @@ } |
{ | ||
"name": "@kadira/storybook-addons", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Storybook addons store", | ||
@@ -8,3 +8,3 @@ "main": "dist/index.js", | ||
"prepublish": "node .scripts/npm-prepublish.js", | ||
"test": "mocha" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
@@ -11,0 +11,0 @@ "repository": { |
@@ -5,4 +5,13 @@ export class AddonStore { | ||
this._panels = {}; | ||
this._channel = null; | ||
} | ||
getChannel() { | ||
return this._channel; | ||
} | ||
setChannel(channel) { | ||
this._channel = channel; | ||
} | ||
getPanels() { | ||
@@ -20,6 +29,6 @@ return this._panels; | ||
loadAddons(...args) { | ||
loadAddons(api) { | ||
Object.keys(this._loaders) | ||
.map(name => this._loaders[name]) | ||
.forEach(loader => loader(...args)); | ||
.forEach(loader => loader(api)); | ||
} | ||
@@ -26,0 +35,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4561
85
1