UNPKG

1.42 kBJavaScriptView Raw
1"use strict";
2var __assign = (this && this.__assign) || function () {
3 __assign = Object.assign || function(t) {
4 for (var s, i = 1, n = arguments.length; i < n; i++) {
5 s = arguments[i];
6 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7 t[p] = s[p];
8 }
9 return t;
10 };
11 return __assign.apply(this, arguments);
12};
13Object.defineProperty(exports, "__esModule", { value: true });
14var Handlebars = require("handlebars");
15var paths_1 = require("./paths");
16var renderer_1 = require("./renderer");
17var utils_1 = require("./utils");
18var config = {};
19if (utils_1.Utils.exists(paths_1.Paths.config)) {
20 /* tslint:disable-next-line */
21 config = require(paths_1.Paths.config);
22}
23function registerCustomTransformations() {
24 var _this = this;
25 if (config.render && config.render.transformations) {
26 Object.keys(config.render.transformations).forEach(function (t) {
27 renderer_1.Renderer.registerTransformation(t, 'diffStep', config.render.transformations[t].bind(_this, Handlebars));
28 });
29 }
30}
31function getBlacklist() {
32 if (config.render && config.render.blacklist) {
33 return config.render.blacklist;
34 }
35 return null;
36}
37exports.Config = __assign({}, config, { registerCustomTransformations: registerCustomTransformations,
38 getBlacklist: getBlacklist });
39//# sourceMappingURL=config.js.map
\No newline at end of file