imdone-core 1.33.4 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/default-settings.js
CHANGED
|
@@ -72,9 +72,9 @@ module.exports = class PluginManager extends Emitter {
|
|
|
72
72
|
return reject(new Error('Unable to find plugin:' + pluginName))
|
|
73
73
|
}
|
|
74
74
|
const { info } = this.getPlugin(pluginClassName)
|
|
75
|
-
const { path
|
|
76
|
-
const pkg = { version, name }
|
|
77
|
-
console.log('Uninstalling:',
|
|
75
|
+
const { path } = info
|
|
76
|
+
// const pkg = { version, name }
|
|
77
|
+
console.log('Uninstalling:', info)
|
|
78
78
|
|
|
79
79
|
rimraf(path, (err) => {
|
|
80
80
|
if (err) return reject(err)
|
|
@@ -137,7 +137,7 @@ module.exports = class PluginManager extends Emitter {
|
|
|
137
137
|
throw new Error(`${pluginClass.name} is not a plugin`)
|
|
138
138
|
const name = pluginClass.name.toString()
|
|
139
139
|
const pluginInstance = new pluginClass(this.project)
|
|
140
|
-
let info = {
|
|
140
|
+
let info = {}
|
|
141
141
|
try {
|
|
142
142
|
info = require(`${path}/package.json`)
|
|
143
143
|
delete info.dependencies
|
|
@@ -146,6 +146,9 @@ module.exports = class PluginManager extends Emitter {
|
|
|
146
146
|
delete info.main
|
|
147
147
|
} catch (e) {
|
|
148
148
|
console.info('No info on plugin:', path)
|
|
149
|
+
} finally {
|
|
150
|
+
info.path = path
|
|
151
|
+
info.name = name
|
|
149
152
|
}
|
|
150
153
|
|
|
151
154
|
pluginInstance.getSettings = () => {
|