Releases: shobhitsharma/pptx-compose
Releases · shobhitsharma/pptx-compose
v1.0.0
BREAKING CHANGES
- Rewrote whole project in Typescript and upgraded peer dependencies for patches
- Added
.toJSON()
method to convert pptx to json - Added
.toPPTX()
method to convert json to pptx - Removed
.execute()
method which was just an array loop over array of pptx files to call.toJSON()
See documentation here for details.
Method changed from .parse()
→ .toJSON()
Before .parse()
new PPTXCompose().parse(<path_to_pptx>, (err, content) => {
if (err) {
throw err;
}
/** DO SOMETHING **/
});
After .toJSON()
await new PPTXCompose().toJSON(<path_to_pptx>)
.then(() => /** DO SOMETHING **/)
.catch((err) => throw err)
Method changed from .bufferize()
→ .toPPTX()
new PPTXCompose().bufferize(<parsed_json_data>, (err, content) => {
if (err) {
throw err;
}
/** DO SOMETHING **/
});
After .toPPTX()
await new PPTXCompose().toPPTX(<parsed_json_data>)
.then(() => /** DO SOMETHING **/)
.catch((err) => throw err)