From 1ef1813ea99c00f8c53c3c2d2f8d154080563229 Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Tue, 23 May 2017 11:35:31 +0100 Subject: [PATCH] ws feature-list --- lib/feature-list.js | 22 ++++++++++++++++++++++ lib/local-web-server.js | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 lib/feature-list.js diff --git a/lib/feature-list.js b/lib/feature-list.js new file mode 100644 index 0000000..3326c8a --- /dev/null +++ b/lib/feature-list.js @@ -0,0 +1,22 @@ +class FeatureList { + execute (options) { + const list = [ + 'lws-log', + 'lws-cors', + 'lws-json', + 'lws-rewrite', + 'lws-body-parser', + 'lws-blacklist', + 'lws-conditional-get', + 'lws-mime', + 'lws-compress', + 'lws-mock-response', + 'lws-spa', + 'lws-static', + 'lws-index' + ] + console.log(list) + } +} + +module.exports = FeatureList diff --git a/lib/local-web-server.js b/lib/local-web-server.js index fc71617..721a41c 100644 --- a/lib/local-web-server.js +++ b/lib/local-web-server.js @@ -27,8 +27,11 @@ class LocalWebServer extends Lws { 'lws-index' ] const moduleDir = path.resolve(__dirname, `../node_modules`) - options = Object.assign({ stack, 'module-dir': moduleDir, prefix: 'lws-' }, options) + options = Object.assign({ stack, 'module-dir': moduleDir, 'module-prefix': 'lws-' }, options) super(options) + + /* add command */ + this.commands.set('feature-list', require('./feature-list')) } getVersion () {