added place holders for style and properties
This commit is contained in:
@ -16,4 +16,8 @@ export class Body {
|
|||||||
this.body.push(new Columns());
|
this.body.push(new Columns());
|
||||||
this.body.push(new DocumentGrid());
|
this.body.push(new DocumentGrid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push(component: XmlComponent) {
|
||||||
|
this.body.push(component);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
import {XmlComponent, Attributes} from "../xml-components";
|
import {XmlComponent, Attributes} from "../xml-components";
|
||||||
import {Body} from "./body";
|
import {Body} from "./body";
|
||||||
|
import {Paragraph} from "../paragraph";
|
||||||
|
|
||||||
export class Document {
|
export class Document {
|
||||||
private document: Array<XmlComponent>;
|
private document: Array<XmlComponent>;
|
||||||
|
private body: Body;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.document = new Array<XmlComponent>();
|
this.document = new Array<XmlComponent>();
|
||||||
this.document.push(new Attributes({}));
|
this.document.push(new Attributes({}));
|
||||||
this.document.push(new Body());
|
this.body = new Body();
|
||||||
|
this.document.push(this.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
test() {
|
addParagraph(paragraph: Paragraph) {
|
||||||
return "hello";
|
this.body.push(paragraph);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,13 +2,15 @@ import * as archiver from "archiver";
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
import {Formatter} from "../formatter";
|
import {Formatter} from "../formatter";
|
||||||
import {Document} from "../../docx";
|
import {Document} from "../../docx";
|
||||||
|
import {Style} from "../../style";
|
||||||
|
import {Properties} from "../../properties";
|
||||||
|
|
||||||
export abstract class Packer {
|
export abstract class Packer {
|
||||||
protected archive: any;
|
protected archive: any;
|
||||||
private formatter: Formatter;
|
private formatter: Formatter;
|
||||||
protected document: Document;
|
protected document: Document;
|
||||||
|
|
||||||
constructor(document: Document) {
|
constructor(document: Document, style: Style, properties: Properties) {
|
||||||
this.formatter = new Formatter();
|
this.formatter = new Formatter();
|
||||||
this.document = document;
|
this.document = document;
|
||||||
this.archive = archiver.create("zip", {});
|
this.archive = archiver.create("zip", {});
|
||||||
|
0
ts/properties/index.ts
Normal file
0
ts/properties/index.ts
Normal file
0
ts/style/index.ts
Normal file
0
ts/style/index.ts
Normal file
Reference in New Issue
Block a user