Rename importDocx to import-dotx
This commit is contained in:
@ -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,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IDocumentTemplate } from "importDocx";
|
||||
import { IDocumentTemplate } from "../import-dotx";
|
||||
|
||||
export interface IFileProperties {
|
||||
template?: IDocumentTemplate;
|
||||
|
@ -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
1
src/import-dotx/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "./import-dotx";
|
@ -1 +0,0 @@
|
||||
export * from "./importDocx";
|
@ -3,4 +3,4 @@
|
||||
export { File as Document } from "./file";
|
||||
export * from "./file";
|
||||
export * from "./export";
|
||||
export * from "./importDocx";
|
||||
export * from "./import-dotx";
|
||||
|
Reference in New Issue
Block a user