From 991e3f3e2a3c81944c9d9e35ed52b0eb7a4bb1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski?= Date: Wed, 10 Feb 2016 12:54:25 +0100 Subject: [PATCH] Build: Move the stripJSONComments variable to the function that uses it --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 0f509e488..094cd5b98 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,7 +2,8 @@ module.exports = function( grunt ) { "use strict"; function readOptionalJSON( filepath ) { - var data = {}; + var stripJSONComments = require( "strip-json-comments" ), + data = {}; try { data = JSON.parse( stripJSONComments( fs.readFileSync( filepath, { encoding: "utf8" } ) @@ -12,7 +13,6 @@ module.exports = function( grunt ) { } var fs = require( "fs" ), - stripJSONComments = require( "strip-json-comments" ), gzip = require( "gzip-js" ), srcHintOptions = readOptionalJSON( "src/.jshintrc" ), newNode = !/^v0/.test( process.version ),