Skip to content

Commit

Permalink
refactor: migrate misc files to ES2015
Browse files Browse the repository at this point in the history
  • Loading branch information
devoto13 committed Mar 15, 2018
1 parent 75ec567 commit 9b472c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 5 additions & 3 deletions lib/constants.js
@@ -1,7 +1,9 @@
var fs = require('graceful-fs')
var path = require('path')
'use strict'

var pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '/../package.json')).toString())
const fs = require('graceful-fs')
const path = require('path')

const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '/../package.json')).toString())

exports.VERSION = pkg.version

Expand Down
14 changes: 8 additions & 6 deletions lib/detached.js
@@ -1,9 +1,11 @@
var fs = require('fs')
'use strict'

var Server = require('./server')
var configurationFile = process.argv[2]
var fileContents = fs.readFileSync(configurationFile, 'utf-8')
const fs = require('fs')

const Server = require('./server')
const configurationFile = process.argv[2]
const fileContents = fs.readFileSync(configurationFile, 'utf-8')
fs.unlink(configurationFile, function () {})
var data = JSON.parse(fileContents)
var server = new Server(data)
const data = JSON.parse(fileContents)
const server = new Server(data)
server.start(data)

0 comments on commit 9b472c4

Please sign in to comment.