@ngoctay/nodejs-pptx
Version:
Generate PPTX files on the server-side with JavaScript.
18 lines (14 loc) • 472 B
JavaScript
const fs = require('fs');
const { Xml } = require('../../xmlnode');
class ThemeFactory {
constructor(parentFactory, args) {
this.parentFactory = parentFactory;
this.content = parentFactory.content;
this.args = args;
}
build() {
const xml = fs.readFileSync(`${__dirname}/../../fragments/ppt/theme/theme1.xml`);
this.content['ppt/theme/theme1.xml'] = Xml.parse(xml);
}
}
module.exports.ThemeFactory = ThemeFactory;