Skip to content

Commit

Permalink
upgrade lws
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Jun 3, 2019
1 parent f07d5e9 commit 311b0b7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 140 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = MiddlewareBase => class SPA extends MiddlewareBase {
const EventEmitter = require('events')

class SPA extends EventEmitter {
description () {
return 'Support for Single Page Applications.'
}
Expand Down Expand Up @@ -57,3 +59,5 @@ module.exports = MiddlewareBase => class SPA extends MiddlewareBase {
}
}
}

module.exports = SPA
161 changes: 30 additions & 131 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"devDependencies": {
"coveralls": "^3.0.3",
"lws": "^1.3.1",
"lws-static": "^0.5.0",
"lws": "^2.0.0-7",
"lws-static": "^1.0.0",
"node-fetch": "^2.6.0",
"nyc": "^14.1.1",
"test-runner": "^0.6.0"
Expand Down
12 changes: 6 additions & 6 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ tom.test('before', function () {
const Spa = require('../')
const Static = require('lws-static')
const Lws = require('lws')
const lws = new Lws()
server = lws.listen({
const lws = Lws.create({
port,
stack: [ Spa, Static ],
directory: 'test/fixture',
spa: 'one.txt'
})
server = lws.server
})

tom.test('missing file redirects to spa', async function () {
Expand Down Expand Up @@ -78,14 +78,14 @@ tom.test('before spaAssetTestFs', function () {
const Spa = require('../')
const Static = require('lws-static')
const Lws = require('lws')
const lws = new Lws()
server = lws.listen({
const lws = Lws.create({
port,
stack: [ Spa, Static ],
directory: 'test/fixture',
spa: 'one.txt',
spaAssetTestFs: true
})
server = lws.server
})

tom.test('spaAssetTestFs: missing file redirects to spa', async function () {
Expand Down Expand Up @@ -177,14 +177,14 @@ tom.test('before spaAssetTest', function () {
const Spa = require('../')
const Static = require('lws-static')
const Lws = require('lws')
const lws = new Lws()
server = lws.listen({
const lws = Lws.create({
port,
stack: [ Spa, Static ],
directory: 'test/fixture',
spa: 'one.txt',
spaAssetTest: 'txt'
})
server = lws.server
})

tom.test('spaAssetTest: missing file redirects to spa', async function () {
Expand Down

0 comments on commit 311b0b7

Please sign in to comment.