-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·37 lines (36 loc) · 924 Bytes
/
cli.js
File metadata and controls
executable file
·37 lines (36 loc) · 924 Bytes
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
36
37
#!/usr/bin/env node
var args, i, len, options, arg
options = {}
args = process.argv.slice(2)
for (i = 0, len = args.length; i < len; i++) {
arg = args[i]
if (arg[0] == "-") {
switch (arg) {
case '-w':
case '--watch':
options.watch = true
break
case '-h':
case '--help':
console.log('usage: snapy <options> (config file)')
console.log('')
console.log('options:')
console.log('-w, --watch restart snapy on changes in config')
console.log('')
console.log('config file is optional and defaults to "snapy.config.[js|json|coffee|ts]"')
console.log('in "test/" and "/"')
process.exit()
break
}
} else {
options.name = arg
}
}
var start
/*try {
//require("coffeescript/register")
//start = require("./src/snapy.coffee")
} catch (e) {
}*/
start = require("./lib/snapy.js")
start(options)