forked from FMFI-UK-1-AIN-412/resolution-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevModule.js
More file actions
22 lines (18 loc) · 661 Bytes
/
Copy pathdevModule.js
File metadata and controls
22 lines (18 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const nodemon = require('nodemon');
const {exec} = require('child_process');
function cmd(command) {
return new Promise((resolve, reject) => {
console.log(command);
const proc = exec(command);
proc.stdout.on('data', function (data) {process.stdout.write(data)});
proc.stderr.on('data', function (data) {process.stderr.write(data)});
proc.on('exit', function (code) {code === 0 ? resolve(0) : reject(code)});
process.on('exit', () => {console.log('killink'); proc.kill()});
});
}
nodemon({
watch: 'public',
ext: 'css',
exec: 'npm run build-module'
});
cmd("npx babel src --out-dir lib/dist -w");