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";
|
"use strict";
|
||||||
|
|
||||||
function readOptionalJSON( filepath ) {
|
function readOptionalJSON( filepath ) {
|
||||||
var data = {};
|
var stripJSONComments = require( "strip-json-comments" ),
|
||||||
|
data = {};
|
||||||
try {
|
try {
|
||||||
data = JSON.parse( stripJSONComments(
|
data = JSON.parse( stripJSONComments(
|
||||||
fs.readFileSync( filepath, { encoding: "utf8" } )
|
fs.readFileSync( filepath, { encoding: "utf8" } )
|
||||||
@ -12,7 +13,6 @@ module.exports = function( grunt ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fs = require( "fs" ),
|
var fs = require( "fs" ),
|
||||||
stripJSONComments = require( "strip-json-comments" ),
|
|
||||||
gzip = require( "gzip-js" ),
|
gzip = require( "gzip-js" ),
|
||||||
srcHintOptions = readOptionalJSON( "src/.jshintrc" ),
|
srcHintOptions = readOptionalJSON( "src/.jshintrc" ),
|
||||||
newNode = !/^v0/.test( process.version ),
|
newNode = !/^v0/.test( process.version ),
|
||||||
|
Loading…
Reference in New Issue
Block a user