diff --git a/index.js b/index.js index 2492b0365e272a4ea211b557208e8bed9f35a129..82b7cdabb7719a177c066128d79bb6a08b63eeac 100755 --- a/index.js +++ b/index.js @@ -4,12 +4,16 @@ const config = require('./sitegin/config') ;(async () => { const opts = await config() - if (opts.noserver) { - require('sitegin/index.js') + if (opts.config.options.nowatch) { + require('./sitegin/index.js') } else { - opts.spawnSync( + spawnSync( process.argv[0], - ['./node_modules/.bin/nodemon', 'sitegin/index.js'], + [ + './node_modules/.bin/nodemon', + 'sitegin/index.js', + ...process.argv.slice(2), + ], { stdio: ['inherit', 'inherit', 'inherit'] }, ) } diff --git a/nodemon.json b/nodemon.json index 70753939f37cbe78be8ddcdc4c5dea4580f892c2..76916c739a50bbde41325e58e493aae13eb28d3d 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,4 +1,4 @@ { "verbose": true, - "ignore": ["build-debug"] + "ignore": ["build-debug", "build"] } \ No newline at end of file