From 90d7d0b3a590e6290b5377b624ddf3c6e6bfca2d Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 26 Jun 2013 23:51:57 +0100 Subject: [PATCH] A slightly more concise way of reading package.json --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index 719c9177a..93457e62e 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1255,7 +1255,7 @@ $tw.boot.startup = function() { } $tw.boot.wikiTiddlersPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiTiddlersSubDir); // Read package info - $tw.packageInfo = JSON.parse(fs.readFileSync($tw.boot.corePath + "/../package.json")); + $tw.packageInfo = require("../package"); // Check node version number if($tw.utils.checkVersions($tw.packageInfo.engines.node.substr(2),process.version.substr(1))) { $tw.utils.error("TiddlyWiki5 requires node.js version " + $tw.packageInfo.engine.node);