File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111'use strict' ;
1212
13+ const path = require ( 'path' ) ;
14+
1315const updateNotifier = require ( 'update-notifier' ) ;
1416
1517const packageInfo = require ( '../package.json' ) ;
1618const help = require ( './lib/help' ) ;
1719const events = require ( './lib/events' ) ;
1820const pe = require ( './lib/pattern_exporter' ) ;
21+ const pm = require ( './lib/plugin_manager' ) ;
1922
2023const defaultConfig = require ( '../patternlab-config.json' ) ;
2124
@@ -154,7 +157,11 @@ const patternlab_module = function(config) {
154157 * @returns {void }
155158 */
156159 installplugin : function ( pluginName ) {
157- patternlab . installPlugin ( pluginName ) ;
160+ //get the config
161+ const configPath = path . resolve ( process . cwd ( ) , 'patternlab-config.json' ) ;
162+ const plugin_manager = new pm ( config , configPath ) ;
163+
164+ plugin_manager . install_plugin ( pluginName ) ;
158165 } ,
159166
160167 /**
You can’t perform that action at this time.
0 commit comments