Skip to content

Commit 0abfb7b

Browse files
committed
chore(cli): remove kebabbing of plugin name
1 parent 5a58824 commit 0abfb7b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/cli/bin/install-plugin.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,23 @@ const wrapAsync = require('./utils').wrapAsync;
1010
const installPlugin = (plugin, config) =>
1111
wrapAsync(function*() {
1212
const name = plugin.name || plugin;
13-
const safePluginName = _.kebabCase(name);
1413
yield checkAndInstallPackage(name);
1514
// Put the installed plugin in the patternlab-config.json
16-
_.set(config, `plugins[${safePluginName}]['enabled']`, true);
15+
_.set(config, `plugins[${name}]['enabled']`, true);
1716

1817
// Get the options from the plugin, if any
1918
const pluginPathConfig = path.resolve(
2019
path.join(process.cwd(), 'node_modules', name, 'config.json')
2120
);
2221
try {
2322
const pluginConfigJSON = require(pluginPathConfig);
24-
if (!_.has(config.plugins[safePluginName].options)) {
25-
_.set(config, `plugins[${safePluginName}]['options]`, pluginConfigJSON);
23+
if (!_.has(config.plugins[name].options)) {
24+
_.set(config, `plugins[${name}]['options]`, pluginConfigJSON);
2625
}
2726
} catch (ex) {
2827
//a config.json file is not required at this time
2928
}
30-
return safePluginName;
29+
return name;
3130
});
3231

3332
module.exports = installPlugin;

0 commit comments

Comments
 (0)