This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
teemant-old/globals.js

20 lines
428 B
JavaScript

const fs = require('fs')
const path = require('path')
const toml = require('toml')
const filename = path.join(__dirname, 'client.config.toml')
const pkg = require(path.join(__dirname, 'package.json'))
let config
try {
config = toml.parse(fs.readFileSync(filename))
} catch (e) {
console.error(e)
process.exit(1)
}
config.client.version = pkg.version
config.client.description = pkg.description
module.exports = config