Browse Source

upgrade deps

master
Lloyd Brookes 8 years ago
parent
commit
5761dd297a
  1. 4
      lib/cli-data.js
  2. 8
      lib/cli-view.js
  3. 17
      lib/local-web-server.js
  4. 10
      package.json

4
lib/cli-data.js

@ -32,6 +32,10 @@ exports.optionDefinitions = [
description: 'Print the stored config.', group: 'misc'
},
{
name: 'config-file', type: String,
description: 'Config file to use', group: 'misc'
},
{
name: 'verbose', type: Boolean, alias: 'v',
description: 'Verbose output.', group: 'misc'
},

8
lib/cli-view.js

@ -4,6 +4,11 @@ class CliView {
constructor (localWebServer) {
this.localWebServer = localWebServer
}
/**
* @example
* { log: 'whatever' }
* { config: { static: { root: 1, hidden: 2 } } }
*/
write (msg) {
const writeToStdout = [ 'log', 'info' ]
Object.keys(msg).forEach(key => {
@ -26,6 +31,9 @@ function printLine (config) {
process.stderr.write(output)
}
/**
* create a nested table for deep object trees
*/
function objectToTable (object) {
const ansi = require('ansi-escape-sequences')
const tableLayout = require('table-layout')

17
lib/local-web-server.js

@ -1,5 +1,22 @@
#!/usr/bin/env node
'use strict'
// /Users/lloydb/Documents/lws/local-web-server/lib/local-web-server.js:307
// console.error(usage)
// ^
//
// ReferenceError: usage is not defined
// at parseCommandLineOptions (/Users/lloydb/Documents/lws/local-web-server/lib/local-web-server.js:307:19)
// at new LocalWebServer (/Users/lloydb/Documents/lws/local-web-server/lib/local-web-server.js:46:47)
// at Object.<anonymous> (/Users/lloydb/Documents/lws/local-web-server/bin/cli.js:4:1)
// at Module._compile (module.js:556:32)
// at Object.Module._extensions..js (module.js:565:10)
// at Module.load (module.js:473:32)
// at tryModuleLoad (module.js:432:12)
// at Function.Module._load (module.js:424:3)
// at Module.runMain (module.js:590:10)
// at run (bootstrap_node.js:394:7)
const path = require('path')
const flatten = require('reduce-flatten')
const arrayify = require('array-back')

10
package.json

@ -39,23 +39,23 @@
"dependencies": {
"ansi-escape-sequences": "^2.2.2",
"array-back": "^1.0.3",
"command-line-args": "^3.0.0",
"command-line-args": "^3.0.1",
"command-line-usage": "^3.0.3",
"config-master": "^2.0.3",
"config-master": "^2.0.4",
"koa": "^2.0.0",
"koa-compose": "^3.1.0",
"koa-convert": "^1.2.0",
"local-web-server-default-stack": "github:local-web-server/default-stack",
"reduce-flatten": "^1.0.1",
"table-layout": "~0.2.2",
"typical": "^2.4.2",
"typical": "^2.6.0",
"walk-back": "^2.0.1"
},
"devDependencies": {
"jsdoc-to-markdown": "^1.3.6",
"jsdoc-to-markdown": "^1.3.7",
"koa-cache-control": "^1.0.0",
"koa-livereload": "~0.2.0",
"req-then": "~0.3.3",
"req-then": "~0.5.0",
"tape": "^4.6.0"
}
}
Loading…
Cancel
Save