feat: add ./nodebb install <plugin_name>

will install the suggested version for current nodebb closes #11060
This commit is contained in:
Barış Soner Uşaklı
2022-11-24 11:17:06 -05:00
parent b5ce7e8ed8
commit 4efc19d5f1
3 changed files with 49 additions and 5 deletions

View File

@@ -173,11 +173,16 @@ program
});
program
.command('install')
.description('Launch the NodeBB web installer for configuration setup')
.action(() => {
require('./setup').webInstall();
.command('install [plugin]')
.description('Launch the NodeBB web installer for configuration setup or install a plugin')
.action((plugin) => {
if (plugin) {
require('./manage').install(plugin);
} else {
require('./setup').webInstall();
}
});
program
.command('build [targets...]')
.description(`Compile static assets ${chalk.red('(JS, CSS, templates, languages)')}`)