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.
30 lines
709 B
30 lines
709 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
|
|
function _react() {
|
|
const data = _interopRequireDefault(require("react"));
|
|
|
|
_react = function _react() {
|
|
return data;
|
|
};
|
|
|
|
return data;
|
|
}
|
|
|
|
var _getConstVarsFromPath = _interopRequireDefault(require("./getConstVarsFromPath"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
var _default = (content, {
|
|
path
|
|
}) => {
|
|
const vars = (0, _getConstVarsFromPath.default)(path);
|
|
const replaceReg = new RegExp(Array.from(vars.keys()).join('|'), 'g');
|
|
return content.replace(replaceReg, match => vars.get(match));
|
|
};
|
|
|
|
exports.default = _default; |