Skip to content

Commit ece941c

Browse files
committed
(fix) entrypoint for package; (docs) for package
1 parent e74f093 commit ece941c

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,21 @@ import Automizer from "pptx-automizer"
2828
const automizer = new Automizer
2929

3030
// First, lets set some preferences
31-
const templateFolder = `my/pptx/templates/`
32-
const outputFolder = `my/pptx/output/`
31+
const templateFolder = `my/pptx/templates`
32+
const outputFolder = `my/pptx/output`
3333

3434
// Let's start and import a root template. All slides will be appended to
35-
// any existing slide in RootTemplate.pptx
36-
let pres = automizer.importRootTemplate(`${templateFolder}RootTemplate.pptx`)
35+
// any existing slides in RootTemplate.pptx
36+
let pres = automizer.importRootTemplate(`${templateFolder}/RootTemplate.pptx`)
3737
// We want to make two files available and give them a handy label.
38-
.importTemplate(`${templateFolder}SlideWithShapes.pptx`, 'shapes')
39-
.importTemplate(`${templateFolder}SlideWithGraph.pptx`, 'graph')
38+
.importTemplate(`${templateFolder}/SlideWithShapes.pptx`, 'shapes')
39+
.importTemplate(`${templateFolder}/SlideWithGraph.pptx`, 'graph')
4040

41-
// addSlide takes two arguments: The first will specify the source presentation
42-
// where your template should come from, the second will set the slide number.
41+
// addSlide takes two arguments: The first will specify the source presentation's
42+
// label to take the template from, the second will set the slide number to require.
4343
pres.addSlide('graph', 1)
44-
45-
// You can also loop through something and add slides in a batch.
46-
for(let i=0; i<=10; i++) {
47-
pres.addSlide('shapes', 1)
48-
}
44+
.addSlide('shapes', 1)
4945

5046
// Finally, we want to write the output file.
51-
pres.write(`${outputFolder}myPresentation.pptx`)
47+
pres.write(`${outputFolder}/myPresentation.pptx`)
5248
```

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import Automizer from "../src/automizer"
1+
import Automizer from "./automizer"
22

33
export default Automizer

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"declarationDir": "./dist",
1313
},
1414
"include": ["src/**/*"],
15-
"exclude": ["node_modules", "__tests__/**/*"]
15+
"exclude": ["node_modules", "__tests__/**/*", "src/dev.ts"]
1616
}

0 commit comments

Comments
 (0)