mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Merge pull request #129 from Dahlgren/feature/standard
Update standard to v12
This commit is contained in:
commit
56d12d5fb3
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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 })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -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 })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -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')
|
||||
})
|
||||
})
|
||||
|
@ -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' }
|
||||
]
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user