|
|
@ -21,9 +21,12 @@ class LocalWebServer { |
|
|
|
const commandLineArgs = require('command-line-args') |
|
|
|
const commandLineUsage = require('command-line-usage') |
|
|
|
const cli = require('../lib/cli-data') |
|
|
|
const loadConfig = require('config-master') |
|
|
|
|
|
|
|
const stored = loadConfig('local-web-server') |
|
|
|
|
|
|
|
/* manually scan for any --stack passed, as we may need to display stack options */ |
|
|
|
const stackPaths = initOptions.stack || [] |
|
|
|
const stackPaths = initOptions.stack || stored.stack || [] |
|
|
|
const stackIndex = process.argv.indexOf('--stack') |
|
|
|
if (stackIndex > -1) { |
|
|
|
for (var i = stackIndex + 1; i < process.argv.length; i++) { |
|
|
@ -89,8 +92,6 @@ class LocalWebServer { |
|
|
|
} |
|
|
|
|
|
|
|
/* combine in stored config */ |
|
|
|
const loadConfig = require('config-master') |
|
|
|
const stored = loadConfig('local-web-server') |
|
|
|
options = Object.assign({ port: 8000 }, initOptions, stored, options.server, options.middleware, options.misc) |
|
|
|
this.options = options |
|
|
|
|
|
|
|