Rename importDocx to import-dotx

This commit is contained in:
Dolan
2018-09-24 22:00:08 +01:00
parent f2b50478bf
commit 0a8feca6ab
6 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
import * as fs from "fs";
import { ImportDocx, Packer, Paragraph, Document } from "../build";
import { Document, ImportDotx, Packer, Paragraph } from "../build";
const importDocx = new ImportDocx();
const importDotx = new ImportDotx();
const filePath = "./demo/dotx/template.dotx";
fs.readFile(filePath, (err, data) => {
@ -9,7 +9,7 @@ fs.readFile(filePath, (err, data) => {
throw new Error(`Failed to read file ${filePath}.`);
}
importDocx.extract(data).then((templateDocument) => {
importDotx.extract(data).then((templateDocument) => {
// This any needs fixing
const sectionProps = {
titlePage: true,

View File

@ -1,4 +1,4 @@
import { IDocumentTemplate } from "importDocx";
import { IDocumentTemplate } from "../import-dotx";
export interface IFileProperties {
template?: IDocumentTemplate;

View File

@ -38,7 +38,7 @@ export interface IDocumentTemplate {
footers: IDocumentFooter[];
}
export class ImportDocx {
export class ImportDotx {
private currentRelationshipId: number;
constructor() {

1
src/import-dotx/index.ts Normal file
View File

@ -0,0 +1 @@
export * from "./import-dotx";

View File

@ -1 +0,0 @@
export * from "./importDocx";

View File

@ -3,4 +3,4 @@
export { File as Document } from "./file";
export * from "./file";
export * from "./export";
export * from "./importDocx";
export * from "./import-dotx";