fix: output

This commit is contained in:
ndom91 2021-09-05 00:09:54 +02:00 committed by thatmattlove
parent 2bc87516d2
commit aecd2d22ae

View File

@ -5,18 +5,18 @@ const sassWatcher = chokidar.watch('styles/**/*.scss');
const tsWatcher = chokidar.watch('src/**/*.ts'); const tsWatcher = chokidar.watch('src/**/*.ts');
const collectStatic = type => { const collectStatic = type => {
console.log('[*] bundling...'); console.log('[*] bundling..');
let args = ''; let args = '';
if (type === 'style') args += '--styles'; if (type === 'style') args += '--styles';
if (type === 'script') args += '--scripts'; if (type === 'script') args += '--scripts';
execSync(`node bundle.js ${args}`); execSync(`node bundle.js ${args}`);
console.log('[*] collecting...'); console.log('[*] collecting..');
exec('../../venv/bin/python3 ../manage.py collectstatic --no-input', (err, stdout, stderr) => { exec('../../venv/bin/python3 ../manage.py collectstatic --no-input', (err, stdout, stderr) => {
err && console.error(err); err && console.error(err);
stdout && console.log(`[*] ${stdout.trim()}`); stdout && console.log(`[*] ${stdout.trim()}`);
stderr && console.log('[**] Python Err:', stderr); stderr && console.log('[**] Python Err:', stderr);
console.log('[*] waiting...\n'); console.log('[*] waiting..\n');
}); });
}; };