Browse Source

rename feature-list to middleware-list.. fix --version

master
Lloyd Brookes 8 years ago
parent
commit
f1a655a348
  1. 4
      lib/cli-app.js
  2. 6
      lib/command/middleware-list.js
  3. 2
      lib/command/serve.js

4
lib/cli-app.js

@ -9,8 +9,8 @@ class WsCliApp extends LwsCliApp {
super (options) super (options)
/* override default serve command */ /* override default serve command */
this.commands.add(null, require('./command/serve')) this.commands.add(null, require('./command/serve'))
/* add feature-list command */
this.commands.add('feature-list', require('./command/feature-list'))
/* add middleware-list command */
this.commands.add('middleware-list', require('./command/middleware-list'))
} }
} }

6
lib/command/feature-list.js → lib/command/middleware-list.js

@ -1,6 +1,6 @@
class FeatureList {
class MiddlewareList {
description () { description () {
return 'Print installed features'
return 'Print available middleware'
} }
execute (options) { execute (options) {
const list = [ const list = [
@ -22,4 +22,4 @@ class FeatureList {
} }
} }
module.exports = FeatureList
module.exports = MiddlewareList

2
lib/command/serve.js

@ -54,7 +54,7 @@ class WsServe extends ServeCommand {
} }
showVersion () { showVersion () {
const pkg = require(path.resolve(__dirname, '..', 'package.json'))
const pkg = require(path.resolve(__dirname, '..', '..', 'package.json'))
console.log(pkg.version) console.log(pkg.version)
} }
} }

Loading…
Cancel
Save