UNPKG

@ngoctay/nodejs-pptx

Version:

Generate PPTX files on the server-side with JavaScript.

18 lines (14 loc) 445 B
const fs = require('fs'); const { Xml } = require('../xmlnode'); class RelsFactory { constructor(parentFactory, args) { this.parentFactory = parentFactory; this.content = parentFactory.content; this.args = args; } build() { const xml = fs.readFileSync(`${__dirname}/../fragments/_rels/.rels`); this.content['_rels/.rels'] = Xml.parse(xml); } } module.exports.RelsFactory = RelsFactory;