Skip to content

Node.js based forum software built for the modern web

feat: add no-build to ./nodebb setup

Baris Usakli476f6717c450
diff --git a/src/cli/index.js b/src/cli/index.js
index fa7534fbbe..7362fe3847 100644
--- a/src/cli/index.js
+++ b/src/cli/index.js
@@ -167,6 +167,7 @@ program
program
.command('setup [config]')
.description('Run the NodeBB setup script, or setup with an initial config')
+ .option('--no-build', 'Run setup without building assets')
.action(function (initConfig) {
if (initConfig) {
try {
diff --git a/src/cli/setup.js b/src/cli/setup.js
index 509de52ddb..6b08cf73c5 100644
--- a/src/cli/setup.js
+++ b/src/cli/setup.js
@@ -33,7 +33,11 @@ function setup(initConfig) {
prestart.loadConfig(configFile);
next();
},
- build.buildAll,
+ function (next) {
+ if (!nconf.get('no-build')) {
+ build.buildAll(next);
+ }
+ }
], function (err, data) {
// Disregard build step data
data = data[0];