fix: simplify dev reload

This commit is contained in:
ndom91 2021-09-12 01:12:11 +02:00 committed by thatmattlove
parent 9a51849012
commit d160de00d3

View File

@ -1,4 +1,4 @@
const { exec, execSync } = require('child_process');
const { execSync } = require('child_process');
const chokidar = require('chokidar');
const sassWatcher = chokidar.watch('styles/**/*.scss');
@ -7,14 +7,7 @@ const tsWatcher = chokidar.watch('src/**/*.ts');
const collectStatic = type => {
console.log('[*] bundling..');
execSync(`node bundle.js ${type && `--${type}`}`);
console.log('[*] collecting..');
exec('../../venv/bin/python3 ../manage.py collectstatic --no-input', (err, stdout, stderr) => {
err && console.error(`[**] Error: ${err}`);
stdout && console.log(`[*] ${stdout.trim()}`);
stderr && console.log(`[**] Python Err: ${stderr.trim()}`);
console.log('[*] waiting..\n');
});
console.log('[*] waiting..\n');
};
sassWatcher.on('change', path => {