File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,24 +10,23 @@ const wrapAsync = require('./utils').wrapAsync;
1010const 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
3332module . exports = installPlugin ;
You can’t perform that action at this time.
0 commit comments