You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
524 B
14 lines
524 B
|
2 months ago
|
"use strict";
|
||
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
|
exports.parseJson = void 0;
|
||
|
|
const jsonc_parser_1 = require("jsonc-parser");
|
||
|
|
const preprocess_1 = require("../preprocess");
|
||
|
|
function parseJson(jsonStr, shouldPre = false, filename) {
|
||
|
|
return (0, jsonc_parser_1.parse)(shouldPre
|
||
|
|
? process.env.UNI_APP_X === 'true'
|
||
|
|
? (0, preprocess_1.preUVueJson)(jsonStr, filename)
|
||
|
|
: (0, preprocess_1.preJson)(jsonStr, filename)
|
||
|
|
: jsonStr);
|
||
|
|
}
|
||
|
|
exports.parseJson = parseJson;
|