From 353401d1481486128e421af4a38d0afe22c57d0b Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 12 Mar 2017 21:37:36 +0000 Subject: [PATCH 1/2] updated readme to add demo folder --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index a15e676695..45c119a654 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,14 @@ $ npm install --save docx ``` +# Demo + +```sh +$ npm run demo +``` + +will run the demo app in the `demo` folder, which creates a file called "My Document.docx" in the root of the project + # Usage From d9e533156fa40cef79d385d2a30fbc858bd08534 Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Sun, 12 Mar 2017 21:43:52 +0000 Subject: [PATCH 2/2] fixed the build :P removed .docx extension if one is already present --- ts/export/packer/local.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ts/export/packer/local.ts b/ts/export/packer/local.ts index 319f2e16f1..d1a5980662 100644 --- a/ts/export/packer/local.ts +++ b/ts/export/packer/local.ts @@ -13,6 +13,7 @@ export class LocalPacker extends Packer { } public pack(path: string): void { + path = path.replace(/.docx$/, ""); this.stream = fs.createWriteStream(`${path}.docx`); super.pack(this.stream); }