mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 15:32:42 +00:00
Fixes #958
This commit is contained in:
parent
fb35bc75e0
commit
b7fffb0ce7
File diff suppressed because one or more lines are too long
@ -52,4 +52,4 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
const fs = require('fs');
|
||||
const shell = require('shelljs');
|
||||
const path = require('path');
|
||||
const _ = require('lodash');
|
||||
@ -25,7 +26,20 @@ shell.echo('');
|
||||
if (process.env.npm_config_plugins === 'true') {
|
||||
const plugins = path.resolve(appPath, 'plugins');
|
||||
|
||||
shell.ls('* -d', plugins).forEach(function (plugin) {
|
||||
shell.ls('* -d', plugins)
|
||||
.filter(x => {
|
||||
let hasAdminFolder;
|
||||
|
||||
try {
|
||||
fs.accessSync(path.resolve(appPath, 'plugins', x, 'admin', 'src', 'containers', 'App'));
|
||||
hasAdminFolder = true;
|
||||
} catch(err) {
|
||||
hasAdminFolder = false;
|
||||
}
|
||||
|
||||
return hasAdminFolder;
|
||||
})
|
||||
.forEach(function (plugin) {
|
||||
shell.echo(`🔸 Plugin - ${_.upperFirst(plugin)}`);
|
||||
shell.echo('📦 Installing packages...');
|
||||
shell.exec(`cd "${path.resolve(plugins, plugin)}" && npm install`, {
|
||||
|
||||
@ -47,4 +47,4 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,4 +51,4 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,4 +48,4 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,4 +48,4 @@
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,4 +55,4 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +215,6 @@ class Strapi extends EventEmitter {
|
||||
|
||||
// Harmonize plugins configuration.
|
||||
await plugins.call(this);
|
||||
console.log('INITIALISED ENDED');
|
||||
}
|
||||
|
||||
reload() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user