(styles): add support to provide external styles (as complete file content)

This commit is contained in:
Igor Bulovski
2018-03-23 12:18:31 +01:00
parent 114c429aed
commit a0e00b8eff
4 changed files with 85 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export class Compiler {
this.archive.pipe(output);
const xmlDocument = xml(this.formatter.format(this.file.Document), true);
const xmlStyles = xml(this.formatter.format(this.file.Styles));
const xmlStyles = this.resolveStyles();
const xmlProperties = xml(this.formatter.format(this.file.CoreProperties), {
declaration: {
standalone: "yes",
@ -102,4 +102,13 @@ export class Compiler {
});
});
}
private resolveStyles(): string {
if (this.file.ExternalStyles) {
return this.file.ExternalStyles;
} else {
return xml(this.formatter.format(this.file.Styles));
}
}
}