-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved list of options out into a separate file
- Loading branch information
Showing
2 changed files
with
67 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
exports.options = [ | ||
{ | ||
name: 'port', | ||
description: 'Port to listen on', | ||
defaultValue: process.env.PORT || 5000 | ||
}, | ||
{ | ||
name: 'cache', | ||
description: 'Time in milliseconds for caching files in the browser', | ||
defaultValue: 3600 | ||
}, | ||
{ | ||
name: 'single', | ||
description: 'Serve single page apps with only one index.html' | ||
}, | ||
{ | ||
name: 'unzipped', | ||
description: 'Disable GZIP compression' | ||
}, | ||
{ | ||
name: 'ignore', | ||
description: 'Files and directories to ignore' | ||
}, | ||
{ | ||
name: 'auth', | ||
description: 'Serve behind basic auth' | ||
}, | ||
{ | ||
name: 'cors', | ||
description: 'Setup * CORS headers to allow requests from any origin', | ||
defaultValue: false | ||
}, | ||
{ | ||
name: 'silent', | ||
description: `Don't log anything to the console` | ||
}, | ||
{ | ||
name: ['n', 'clipless'], | ||
description: `Don't copy address to clipboard`, | ||
defaultValue: false | ||
}, | ||
{ | ||
name: 'open', | ||
description: 'Open local address in browser', | ||
defaultValue: false | ||
} | ||
] | ||
|
||
exports.minimist = { | ||
alias: { | ||
a: 'auth', | ||
C: 'cors', | ||
S: 'silent', | ||
s: 'single', | ||
u: 'unzipped', | ||
n: 'clipless', | ||
o: 'open' | ||
}, | ||
boolean: ['auth', 'cors', 'silent', 'single', 'unzipped', 'clipless', 'open'] | ||
} |