diff --git a/netbox/project-static/develop.js b/netbox/project-static/develop.js index f57384be8..cdbcf2842 100644 --- a/netbox/project-static/develop.js +++ b/netbox/project-static/develop.js @@ -6,10 +6,7 @@ const tsWatcher = chokidar.watch('src/**/*.ts'); const collectStatic = type => { console.log('[*] bundling..'); - let args = ''; - if (type === 'style') args += '--styles'; - if (type === 'script') args += '--scripts'; - execSync(`node bundle.js ${args}`); + execSync(`node bundle.js ${type && `--${type}`}`); console.log('[*] collecting..'); exec('../../venv/bin/python3 ../manage.py collectstatic --no-input', (err, stdout, stderr) => { @@ -22,10 +19,10 @@ const collectStatic = type => { sassWatcher.on('change', path => { console.log(`[*] '${path}' has changed`); - collectStatic('style'); + collectStatic('styles'); }); tsWatcher.on('change', path => { console.log(`[*] '${path}' has changed`); - collectStatic('script'); + collectStatic('scripts'); });