mirror of
https://github.com/jquery/jquery.git
synced 2026-02-05 13:25:23 -05:00
Build: Move the stripJSONComments variable to the function that uses it
This commit is contained in:
@@ -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 ),
|
||||
|
||||
Reference in New Issue
Block a user