Browse Source

use package files array.. linting

master
Lloyd Brookes 7 years ago
parent
commit
5df2c4c98d
  1. 6
      index.js
  2. 4
      package.json
  3. 1
      test/cli.js

6
lib/local-web-server.js → index.js

@ -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)

4
package.json

@ -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",

1
test/cli.js

@ -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

Loading…
Cancel
Save