deep-package-manager
Version:
DEEP Package Manager
41 lines (34 loc) • 746 B
JavaScript
/**
* Created by CCristi on 6/23/16.
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.EnvHashDriver = undefined;
var _AbstractDriver = require('./AbstractDriver');
class EnvHashDriver extends _AbstractDriver.AbstractDriver {
/**
* @param {String} env
* @param {String} hash
*/
constructor(env, hash) {
super();
this._env = env;
this._hash = hash;
}
/**
* @param {String} htmlContent
* @returns {String}
*/
inject(htmlContent) {
return this.replaceTags(htmlContent, EnvHashDriver.TAG_SUFFIX, `${this._env}-${this._hash}`);
}
/**
* @returns {String}
*/
static get TAG_SUFFIX() {
return 'hash';
}
}
exports.EnvHashDriver = EnvHashDriver;