2015-11-11 17:53:01 +00:00
module . exports = {
definitions : [
{
name : 'port' , alias : 'p' , type : Number , defaultOption : true ,
2015-11-27 09:31:28 +00:00
description : 'Web server port.' , group : 'server'
} ,
{
name : 'directory' , alias : 'd' , type : String , typeLabel : '[underline]{path}' ,
description : 'Root directory, defaults to the current directory.' , group : 'server'
2015-11-11 17:53:01 +00:00
} ,
{
2015-11-16 13:22:51 +00:00
name : 'log-format' , alias : 'f' , type : String ,
2015-11-16 23:02:27 +00:00
description : "If a format is supplied an access log is written to stdout. If not, a dynamic statistics view is displayed. Use a preset ('none', 'dev','combined', 'short', 'tiny' or 'logstalgia') or supply a custom format (e.g. ':method -> :url')." , group : 'server'
2015-11-11 17:53:01 +00:00
} ,
{
2015-11-27 09:31:28 +00:00
name : 'rewrite' , alias : 'r' , type : String , multiple : true , typeLabel : '[underline]{expression} ...' ,
description : "A list of URL rewrite rules. For each rule, separate the 'from' and 'to' routes with '->'. Whitespace surrounded the routes is ignored. E.g. '/from -> /to'." , group : 'server'
} ,
{
name : 'spa' , alias : 's' , type : String , typeLabel : '[underline]{file}' ,
description : 'Path to a Single Page App, e.g. app.html.' , group : 'server'
2015-11-11 17:53:01 +00:00
} ,
{
name : 'compress' , alias : 'c' , type : Boolean ,
2015-11-27 09:31:28 +00:00
description : 'Serve gzip-compressed resources, where applicable.' , group : 'server'
2015-11-11 17:53:01 +00:00
} ,
{
2015-11-17 16:52:01 +00:00
name : 'forbid' , alias : 'b' , type : String , multiple : true , typeLabel : '[underline]{path} ...' ,
2015-11-27 09:31:28 +00:00
description : 'A list of forbidden routes.' , group : 'server'
2015-11-15 23:00:17 +00:00
} ,
{
2015-11-15 15:51:18 +00:00
name : 'no-cache' , alias : 'n' , type : Boolean ,
2015-11-15 21:15:25 +00:00
description : 'Disable etag-based caching - forces loading from disk each request.' , group : 'server'
2015-11-15 15:51:18 +00:00
} ,
{
2015-11-30 11:06:22 +00:00
name : 'key' , type : String , typeLabel : '[underline]{file}' , group : 'server' ,
description : 'SSL key. Required, along with --cert for https.'
} ,
{
name : 'cert' , type : String , typeLabel : '[underline]{file}' , group : 'server' ,
description : 'SSL cert. Required, along with --key for https.'
} ,
{
2015-11-17 17:50:37 +00:00
name : 'verbose' , type : Boolean ,
description : 'Verbose output, useful for debugging.' , group : 'server'
} ,
{
2015-11-11 17:53:01 +00:00
name : 'help' , alias : 'h' , type : Boolean ,
2015-11-27 09:31:28 +00:00
description : 'Print these usage instructions.' , group : 'misc'
2015-11-11 17:53:01 +00:00
} ,
{
name : 'config' , type : Boolean ,
2015-11-27 09:31:28 +00:00
description : 'Print the stored config.' , group : 'misc'
2015-11-11 17:53:01 +00:00
}
] ,
usageData : {
title : 'local-web-server' ,
2015-11-16 23:02:27 +00:00
description : 'A simple web-server for productive front-end development.' ,
2015-11-11 17:53:01 +00:00
footer : 'Project home: [underline]{https://github.com/75lb/local-web-server}' ,
synopsis : [
2015-11-27 19:55:51 +00:00
'$ ws [<server options>]' ,
2015-11-11 17:53:01 +00:00
'$ ws --config' ,
'$ ws --help'
] ,
groups : {
server : 'Server' ,
misc : 'Misc'
}
2015-10-30 11:31:59 +00:00
}
2015-11-11 17:53:01 +00:00
}