-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·35 lines (32 loc) · 889 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env node
let option = process.argv[2];
const CreamieWatcher = require('./creamie-watcher');
if (option) {
switch (option) {
case '-i':
try {
CreamieWatcher.boot();
} catch (error) {
console.error(error);
console.log(
'\n\nThis is not the right place run this command.\n - Run this command on your creamie project folder!\n\n'
);
}
break;
case '-h':
case 'help':
console.log(
'"creamie-watch" - Default command that will start listening for changes on html, css files and boot.'
);
console.log(
'"creamie-watch -i" - ignore the listener but boots the html, css files to boot.js.'
);
break;
default:
console.log(
'No Such option available on this command. Use "creamie-watch help".'
);
}
} else {
CreamieWatcher.watch();
}