UNPKG

@pubby/sdk

Version:
29 lines (22 loc) 961 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib = require('tslib'); var module$1 = require('../../module.js'); var merge = require('lodash.defaultsdeep'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge); var ConfigModule = /** @class */ (function (_super) { tslib.__extends(ConfigModule, _super); function ConfigModule(pubby, options) { var _this = _super.call(this, pubby, options) || this; pubby.config = _this; _this.current = merge__default["default"]({}, options); return _this; } ConfigModule.prototype.merge = function (config) { this.current = merge__default["default"](this.current, config); return this; }; return ConfigModule; }(module$1.PubbyModule)); exports.ConfigModule = ConfigModule;