Browse Source

correct version in stats

master
Lloyd Brookes 8 years ago
parent
commit
e06e24cdef
  1. 6
      lib/command/serve.js
  2. 6
      lib/local-web-server.js
  3. 2
      test/test.js

6
lib/command/serve.js

@ -8,8 +8,10 @@ const path = require('path')
class WsServe extends ServeCommand { class WsServe extends ServeCommand {
execute (options, argv) { execute (options, argv) {
const usage = require('lws/lib/usage') const usage = require('lws/lib/usage')
usage.defaults.set('an', 'ws')
usage.defaults.set('cd4', 'cli')
usage.defaults
.set('an', 'ws')
.set('av', require('../../package').version)
.set('cd4', 'cli')
options = { options = {
stack: [ stack: [
'lws-log', 'lws-log',

6
lib/local-web-server.js

@ -4,8 +4,10 @@ const path = require('path')
class LocalWebServer extends Lws { class LocalWebServer extends Lws {
create (options) { create (options) {
const usage = require('lws/lib/usage') const usage = require('lws/lib/usage')
usage.defaults.set('an', 'ws')
usage.defaults.set('cd4', 'api')
usage.defaults
.set('an', 'ws')
.set('av', require('../package').version)
.set('cd4', 'api')
options = Object.assign({ options = Object.assign({
moduleDir: path.resolve(__dirname, `../node_modules`), moduleDir: path.resolve(__dirname, `../node_modules`),
modulePrefix: 'lws-', modulePrefix: 'lws-',

2
test/test.js

@ -3,6 +3,8 @@ const TestRunner = require('test-runner')
const request = require('req-then') const request = require('req-then')
const LocalWebServer = require('../') const LocalWebServer = require('../')
const a = require('assert') const a = require('assert')
const usage = require('lws/lib/usage')
usage.disable()
const runner = new TestRunner() const runner = new TestRunner()

Loading…
Cancel
Save