Merge pull request #399 from hogofwar/pkg

Rename package variable to pkg, as "package" is reserved.
This commit is contained in:
Max-P 2016-06-11 22:28:13 -04:00 committed by GitHub
commit 48a1d4cc2d

View File

@ -1,5 +1,5 @@
var _ = require("lodash");
var package = require("../package.json");
var pkg = require("../package.json");
var bcrypt = require("bcrypt-nodejs");
var Client = require("./client");
var ClientManager = require("./clientManager");
@ -62,11 +62,11 @@ module.exports = function(options) {
manager.sockets = sockets;
log.info("The Lounge v" + package.version + " is now running on", protocol + "://" + config.host + ":" + config.port + "/");
log.info("The Lounge v" + pkg.version + " is now running on", protocol + "://" + config.host + ":" + config.port + "/");
log.info("Press ctrl-c to stop\n");
if (!require("semver").satisfies(process.version, package.engines.node)) {
log.warn("The oldest supported Node.js version is ", package.engines.node);
if (!require("semver").satisfies(process.version, pkg.engines.node)) {
log.warn("The oldest supported Node.js version is ", pkg.engines.node);
log.warn("We strongly encourage you to upgrade, see https://nodejs.org/en/download/package-manager/ for more details\n");
}
@ -98,7 +98,7 @@ function index(req, res, next) {
return fs.readFile("client/index.html", "utf-8", function(err, file) {
var data = _.merge(
package,
pkg,
config
);
var template = _.template(file);