mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-16 20:48:17 -06:00
fix: simplify dev reload
This commit is contained in:
parent
9a51849012
commit
d160de00d3
@ -1,4 +1,4 @@
|
|||||||
const { exec, execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
const chokidar = require('chokidar');
|
const chokidar = require('chokidar');
|
||||||
|
|
||||||
const sassWatcher = chokidar.watch('styles/**/*.scss');
|
const sassWatcher = chokidar.watch('styles/**/*.scss');
|
||||||
@ -7,14 +7,7 @@ const tsWatcher = chokidar.watch('src/**/*.ts');
|
|||||||
const collectStatic = type => {
|
const collectStatic = type => {
|
||||||
console.log('[*] bundling..');
|
console.log('[*] bundling..');
|
||||||
execSync(`node bundle.js ${type && `--${type}`}`);
|
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 => {
|
sassWatcher.on('change', path => {
|
||||||
|
Loading…
Reference in New Issue
Block a user