1 | "use strict";
|
2 | var __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 | };
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 | var Handlebars = require("handlebars");
|
15 | var paths_1 = require("./paths");
|
16 | var renderer_1 = require("./renderer");
|
17 | var utils_1 = require("./utils");
|
18 | var config = {};
|
19 | if (utils_1.Utils.exists(paths_1.Paths.config)) {
|
20 |
|
21 | config = require(paths_1.Paths.config);
|
22 | }
|
23 | function 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 | }
|
31 | function getBlacklist() {
|
32 | if (config.render && config.render.blacklist) {
|
33 | return config.render.blacklist;
|
34 | }
|
35 | return null;
|
36 | }
|
37 | exports.Config = __assign({}, config, { registerCustomTransformations: registerCustomTransformations,
|
38 | getBlacklist: getBlacklist });
|
39 |
|
\ | No newline at end of file |