File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,23 @@ const wrapAsync = require('./utils').wrapAsync;
10
10
const installPlugin = ( plugin , config ) =>
11
11
wrapAsync ( function * ( ) {
12
12
const name = plugin . name || plugin ;
13
- const safePluginName = _ . kebabCase ( name ) ;
14
13
yield checkAndInstallPackage ( name ) ;
15
14
// Put the installed plugin in the patternlab-config.json
16
- _ . set ( config , `plugins[${ safePluginName } ]['enabled']` , true ) ;
15
+ _ . set ( config , `plugins[${ name } ]['enabled']` , true ) ;
17
16
18
17
// Get the options from the plugin, if any
19
18
const pluginPathConfig = path . resolve (
20
19
path . join ( process . cwd ( ) , 'node_modules' , name , 'config.json' )
21
20
) ;
22
21
try {
23
22
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 ) ;
26
25
}
27
26
} catch ( ex ) {
28
27
//a config.json file is not required at this time
29
28
}
30
- return safePluginName ;
29
+ return name ;
31
30
} ) ;
32
31
33
32
module . exports = installPlugin ;
You can’t perform that action at this time.
0 commit comments