-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·17 lines (17 loc) · 821 Bytes
/
cli.js
File metadata and controls
executable file
·17 lines (17 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env node
var program = require('commander')
, fs = require('fs')
, path = require('path')
, list = function (val) { return val.split(',') }
program
.version(JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')).version)
.usage('[options]')
.option('-p, --port <number>', 'port to use (default: 8080)')
.option('-f, --folder <path>', 'root path (default: dev)')
.option('-s, --static <path>', 'exports a static version (for ghpages)')
.option('-e, --extensions <list>', 'extensions to match (default: js,coffee)', list)
.option('-t, --test', 'runs karma on the folder')
.option('-w, --watch', 'only with --test, runs karma in watch mode')
.option('--browsers <list>', 'only with --test, sets browsers', list)
.parse(process.argv)
require("./lib/index.js")(program)