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 DocumentGrid());
|
||||
}
|
||||
|
||||
push(component: XmlComponent) {
|
||||
this.body.push(component);
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
import {XmlComponent, Attributes} from "../xml-components";
|
||||
import {Body} from "./body";
|
||||
import {Paragraph} from "../paragraph";
|
||||
|
||||
export class Document {
|
||||
private document: Array<XmlComponent>;
|
||||
private body: Body;
|
||||
|
||||
constructor() {
|
||||
this.document = new Array<XmlComponent>();
|
||||
this.document.push(new Attributes({}));
|
||||
this.document.push(new Body());
|
||||
this.body = new Body();
|
||||
this.document.push(this.body);
|
||||
}
|
||||
|
||||
test() {
|
||||
return "hello";
|
||||
addParagraph(paragraph: Paragraph) {
|
||||
this.body.push(paragraph);
|
||||
}
|
||||
}
|
@ -2,13 +2,15 @@ import * as archiver from "archiver";
|
||||
import * as fs from "fs";
|
||||
import {Formatter} from "../formatter";
|
||||
import {Document} from "../../docx";
|
||||
import {Style} from "../../style";
|
||||
import {Properties} from "../../properties";
|
||||
|
||||
export abstract class Packer {
|
||||
protected archive: any;
|
||||
private formatter: Formatter;
|
||||
protected document: Document;
|
||||
|
||||
constructor(document: Document) {
|
||||
constructor(document: Document, style: Style, properties: Properties) {
|
||||
this.formatter = new Formatter();
|
||||
this.document = document;
|
||||
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