a6625cfadc
* WIP #945 Added some structure for the extensions support * WIP #945 Added ext installation using npm * WIP #945 Added some structure for the extensions support * WIP #945 Added ext installation using npm * WIP #945 Restructured export formats * WIP #945 Added ExportFormat:Pipeline installation * WIP #945 Updated extension installer * WIP #945 Fixed format.js format path * WIP #945 Added reinstalling message * WIP #945 Updated the default Basic CLI * WIP Updated deserializers and cli deserializer * WIP #945 Added simple static ext config * WIP #945 Added custom config dialog for exporting pipelines * WIP #945 Added dynamic updating based on config * WIP #945 Added section headers * WIP #945 Renamed to Export:Pipeline * WIP #945 moved cli export to first option * WIP #945 Renamed plugin 'GenerateExecFile' -> 'Export' * WIP #945 Renamed GenExecFile -> Export * WIP #945 Added 'deepforge extension remove X' * WIP #945 Added 'list' command for extensions * WIP #945 fixed minor linting issues * WIP #945 aliased remove/rm, list/ls * WIP #945 Moved gen installation fn to utils/extender * WIP #945 Added ext reinstall script on postinstall * WIP #945 don't prompt if no options * WIP #945 Updated the plugin name in registry * WIP #945 Updated format template * WIP #945 Fixed cli tests * WIP #945 Removed unused main method * WIP #945 Fixed linter issues
31 linhas
942 B
JavaScript
31 linhas
942 B
JavaScript
// Re-install all extensions
|
|
var extender = require('./extender'),
|
|
Q = require('q'),
|
|
extConfig = extender.getExtensionsConfig(),
|
|
types,
|
|
names,
|
|
currentInstall = Q(),
|
|
installCount = 0,
|
|
config;
|
|
|
|
// Read the extensions and reinstall each of them
|
|
types = Object.keys(extConfig);
|
|
for (var i = types.length; i--;) {
|
|
names = Object.keys(extConfig[types[i]]);
|
|
if (names.length) {
|
|
installCount += names.length;
|
|
for (var j = names.length; j--;) {
|
|
// eslint-disable-next-line no-console
|
|
console.log(`Re-installing ${names[j]} extension...`);
|
|
config = extConfig[types[i]][names[j]];
|
|
currentInstall = currentInstall
|
|
.then(() => extender.install(config.project.arg, true));
|
|
}
|
|
}
|
|
}
|
|
|
|
if (installCount) {
|
|
// eslint-disable-next-line no-console
|
|
currentInstall.then(() => console.log('Extensions reinstalled successfully'));
|
|
}
|