aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2016-02-10 12:54:25 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2016-02-10 12:54:25 +0100
commit991e3f3e2a3c81944c9d9e35ed52b0eb7a4bb1c9 (patch)
tree509db04fb148866e7c782b72559aa9301ddf257a
parent3f46cec169addb096fe576313e5cc6dde8618c04 (diff)
downloadjquery-991e3f3e2a3c81944c9d9e35ed52b0eb7a4bb1c9.tar.gz
jquery-991e3f3e2a3c81944c9d9e35ed52b0eb7a4bb1c9.zip
Build: Move the stripJSONComments variable to the function that uses it
-rw-r--r--Gruntfile.js4
1 files 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 ),