@speedy-js/mono
Version:
Monorepo development & continuous integration tooling.
28 lines • 763 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangelogProcessor = void 0;
class ChangelogProcessor {
constructor(cwd, input) {
this.cwd = cwd;
this.input = input;
this.processorsTuple = [];
}
/**
* Add a processor
*/
addProcessor(processor, options) {
this.processorsTuple.push([processor, options]);
}
/**
* Process and get final result
*/
process() {
const { cwd, input } = this;
return this.processorsTuple.reduce((memo, current) => {
memo = current[0](cwd, memo, current[1]);
return memo;
}, input);
}
}
exports.ChangelogProcessor = ChangelogProcessor;
//# sourceMappingURL=shared.js.map