Update standard to v12

This commit is contained in:
Björn Dahlgren 2018-12-15 14:27:07 +01:00
parent 1743ca70cd
commit 81259c9bc7
5 changed files with 19 additions and 19 deletions

View File

@ -54,7 +54,7 @@
"devDependencies": {
"mocha": "~3.2.0",
"should": "~13.0.1",
"standard": "^10.0.3",
"standard": "^12.0.1",
"timekeeper": "0.0.5"
}
}

View File

@ -28,7 +28,7 @@ module.exports = function (missionsManager) {
if (err) {
res.status(500).send(err)
} else {
res.status(200).json({success: true})
res.status(200).json({ success: true })
}
}
)
@ -47,7 +47,7 @@ module.exports = function (missionsManager) {
if (err) {
res.status(500).send(err)
} else {
res.json({success: true})
res.json({ success: true })
}
})
})
@ -64,7 +64,7 @@ module.exports = function (missionsManager) {
if (err) {
res.status(500).send(err)
} else {
res.json({success: true})
res.json({ success: true })
}
})
})

View File

@ -32,16 +32,16 @@ module.exports = function (manager, mods) {
router.post('/:server/start', function (req, res) {
var server = manager.getServer(req.params.server)
server.start()
res.json({status: 'ok', pid: server.pid})
res.json({ status: 'ok', pid: server.pid })
})
router.post('/:server/stop', function (req, res) {
var server = manager.getServer(req.params.server)
server.stop(function () {
if (!server.pid) {
res.json({status: true, pid: server.pid})
res.json({ status: true, pid: server.pid })
} else {
res.json({status: false, pid: server.pid})
res.json({ status: false, pid: server.pid })
}
})
})

View File

@ -5,14 +5,14 @@ var Server = require('../../lib/server.js')
describe('Server', function () {
describe('generateId()', function () {
it('should include title', function () {
var server = new Server(null, null, {title: 'title.with.lot.of.dots'})
var server = new Server(null, null, { title: 'title.with.lot.of.dots' })
server.generateId().should.eql('title-with-lot-of-dots')
})
})
describe('toJSON()', function () {
it('should include title', function () {
var server = new Server(null, null, {title: 'test'})
var server = new Server(null, null, { title: 'test' })
server.toJSON().should.have.property('title', 'test')
})
})

View File

@ -42,16 +42,16 @@ module.exports = {
module: {
loaders: [
{test: /\.css$/, loaders: ['style-loader', 'css-loader']},
{test: /\.json$/, loaders: ['json-loader']},
{test: /\.png$/, loader: 'url-loader?limit=8192&mimetype=image/png'},
{test: /\.jpe?g$/, loader: 'url-loader?limit=8192&mimetype=image/jpg'},
{test: /\.gif$/, loader: 'url-loader?limit=8192&mimetype=image/gif'},
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=image/svg+xml'},
{test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff2'},
{test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff'},
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/octet-stream'},
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'}
{ test: /\.css$/, loaders: ['style-loader', 'css-loader'] },
{ test: /\.json$/, loaders: ['json-loader'] },
{ test: /\.png$/, loader: 'url-loader?limit=8192&mimetype=image/png' },
{ test: /\.jpe?g$/, loader: 'url-loader?limit=8192&mimetype=image/jpg' },
{ test: /\.gif$/, loader: 'url-loader?limit=8192&mimetype=image/gif' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=image/svg+xml' },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff2' },
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff' },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/octet-stream' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader' }
]
},