mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Move the stripJSONComments variable to the function that uses it
This commit is contained in:
parent
3f46cec169
commit
991e3f3e2a
@ -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 ),
|
||||
|
Loading…
Reference in New Issue
Block a user