From: Timo Tijhof Date: Tue, 25 Nov 2014 02:35:29 +0000 (+0000) Subject: Maintenance: Simplify reading of package.json by using require() X-Git-Tag: 1.31.0-rc.0~13183 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=cf51a23ff177339535fb5111707a39e909e60861;p=lhc%2Fweb%2Fwiklou.git Maintenance: Simplify reading of package.json by using require() Change-Id: Ifdee4733527cca8353cb9b59d6079939fdd7309e --- diff --git a/maintenance/resources/update-oojs-ui.sh b/maintenance/resources/update-oojs-ui.sh index bfa2eb021b..a20b83be8e 100755 --- a/maintenance/resources/update-oojs-ui.sh +++ b/maintenance/resources/update-oojs-ui.sh @@ -27,7 +27,7 @@ else npm install oojs-ui || exit 1 fi -OOJSUI_VERSION=$(node -e 'console.log(JSON.parse(require("fs").readFileSync("./node_modules/oojs-ui/package.json")).version);') +OOJSUI_VERSION=$(node -e 'console.log(require("./node_modules/oojs-ui/package.json").version);') if [ "$OOJSUI_VERSION" == "" ] then echo 'Could not find OOjs UI version' diff --git a/maintenance/resources/update-oojs.sh b/maintenance/resources/update-oojs.sh index 8627c7199c..1d5c2b1709 100755 --- a/maintenance/resources/update-oojs.sh +++ b/maintenance/resources/update-oojs.sh @@ -27,7 +27,7 @@ else npm install oojs || exit 1 fi -OOJS_VERSION=$(node -e 'console.log(JSON.parse(require("fs").readFileSync("./node_modules/oojs/package.json")).version);') +OOJS_VERSION=$(node -e 'console.log(require("./node_modules/oojs/package.json").version);') if [ "$OOJS_VERSION" == "" ] then echo 'Could not find OOjs version'