salix/print/lib/cssReader.js

19 lines
327 B
JavaScript
Raw Normal View History

const fs = require('fs-extra');
class CssReader {
constructor(files) {
this.files = files;
this.css = [];
}
mergeStyles() {
this.files.forEach(file => {
this.css.push(fs.readFileSync(file));
});
return this.css.join('\n');
}
}
module.exports = CssReader;