use package files array.. linting
This commit is contained in:
@ -17,7 +17,7 @@ const path = require('path')
|
||||
* // secure, SPA server with listening websocket now ready on port 8050
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @alias module:local-web-server
|
||||
*/
|
||||
class LocalWebServer extends Lws {
|
||||
@ -45,12 +45,12 @@ class LocalWebServer extends Lws {
|
||||
const usage = require('lws/lib/usage')
|
||||
usage.defaults
|
||||
.set('an', 'ws')
|
||||
.set('av', require('../package').version)
|
||||
.set('av', require('./package').version)
|
||||
.set('cd4', 'api')
|
||||
options = Object.assign({
|
||||
moduleDir: path.resolve(__dirname, `../node_modules`),
|
||||
moduleDir: path.resolve(__dirname, `./node_modules`),
|
||||
modulePrefix: 'lws-',
|
||||
stack: require('./default-stack')
|
||||
stack: require('./lib/default-stack')
|
||||
}, options)
|
||||
return super.listen(options)
|
||||
|
@ -3,7 +3,7 @@ const LwsCliApp = require('lws/lib/cli-app')
|
||||
|
||||
class WsCliApp extends LwsCliApp {
|
||||
constructor (options) {
|
||||
super (options)
|
||||
super(options)
|
||||
/* override default serve command */
|
||||
this.commands.add(null, require('./command/serve'))
|
||||
/* add middleware-list command */
|
||||
|
@ -5,7 +5,6 @@
|
||||
"bin": {
|
||||
"ws": "./bin/cli.js"
|
||||
},
|
||||
"main": "lib/local-web-server.js",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"dev",
|
||||
@ -31,6 +30,9 @@
|
||||
},
|
||||
"repository": "https://github.com/lwsjs/local-web-server",
|
||||
"author": "Lloyd Brookes <75pound@gmail.com>",
|
||||
"files": [
|
||||
"bin", "lib", "index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"lws": "^1.2.3",
|
||||
"lws-basic-auth": "^0.1.1",
|
||||
|
@ -19,7 +19,6 @@ runner.test('cli.run', async function () {
|
||||
})
|
||||
|
||||
runner.test('cli.run: bad option', async function () {
|
||||
const port = 7500 + this.index
|
||||
const origArgv = process.argv.slice()
|
||||
process.argv = [ 'node', 'something', '--should-fail' ]
|
||||
const exitCode = process.exitCode
|
||||
|
Reference in New Issue
Block a user