Experiment with common-good module
This commit is contained in:
48
src/cli.js
48
src/cli.js
@ -1,37 +1,37 @@
|
||||
'use strict'
|
||||
"use strict";
|
||||
|
||||
const yargs = require('yargs')
|
||||
const yargs = require("yargs");
|
||||
|
||||
module.exports = () =>
|
||||
yargs
|
||||
.scriptName('oasis')
|
||||
.env('OASIS')
|
||||
.help('h')
|
||||
.alias('h', 'help')
|
||||
.usage('Usage: $0 [options]')
|
||||
.options('open', {
|
||||
describe: 'Automatically open app in web browser. Use --no-open to disable.',
|
||||
.scriptName("oasis")
|
||||
.env("OASIS")
|
||||
.help("h")
|
||||
.alias("h", "help")
|
||||
.usage("Usage: $0 [options]")
|
||||
.options("open", {
|
||||
describe:
|
||||
"Automatically open app in web browser. Use --no-open to disable.",
|
||||
default: true,
|
||||
type: 'boolean'
|
||||
type: "boolean"
|
||||
})
|
||||
.options('offline', {
|
||||
.options("offline", {
|
||||
describe: "Don't try to connect to scuttlebutt peers or pubs",
|
||||
default: false,
|
||||
type: 'boolean'
|
||||
type: "boolean"
|
||||
})
|
||||
.options('host', {
|
||||
describe: 'Hostname for web app to listen on',
|
||||
default: 'localhost',
|
||||
type: 'string'
|
||||
.options("host", {
|
||||
describe: "Hostname for web app to listen on",
|
||||
default: "localhost",
|
||||
type: "string"
|
||||
})
|
||||
.options('port', {
|
||||
describe: 'Port for web app to listen on',
|
||||
.options("port", {
|
||||
describe: "Port for web app to listen on",
|
||||
default: 3000,
|
||||
type: 'number'
|
||||
type: "number"
|
||||
})
|
||||
.options('debug', {
|
||||
describe: 'Use verbose output for debugging',
|
||||
.options("debug", {
|
||||
describe: "Use verbose output for debugging",
|
||||
default: false,
|
||||
type: 'boolean'
|
||||
})
|
||||
.argv
|
||||
type: "boolean"
|
||||
}).argv;
|
||||
|
Reference in New Issue
Block a user