11import {
22 AutomizerParams ,
33 AutomizerSummary ,
4- IPresentationProps , PresTemplate , RootPresTemplate ,
4+ IPresentationProps , PresTemplate , RootPresTemplate ,
55} from './definitions/app'
66
77import Template from './template'
88import Slide from './slide'
99import FileHelper from './helper/file'
1010
1111export default class Automizer implements IPresentationProps {
12- rootTemplate : RootPresTemplate
13- templates : PresTemplate [ ]
14- templateDir : string
15- outputDir : string
16- timer : number
12+ rootTemplate : RootPresTemplate
13+ templates : PresTemplate [ ]
14+ templateDir : string
15+ outputDir : string
16+ timer : number
1717 params : AutomizerParams
1818
1919 /**
@@ -31,21 +31,21 @@ export default class Automizer implements IPresentationProps {
3131 this . timer = Date . now ( )
3232 }
3333
34- /**
35- * Load a pptx file and set it as root template.
36- * @param {string } location - Filename or path to the template. Will be prefixed with 'templateDir'
37- * @return {Automizer } Instance of Automizer
38- */
34+ /**
35+ * Load a pptx file and set it as root template.
36+ * @param {string } location - Filename or path to the template. Will be prefixed with 'templateDir'
37+ * @return {Automizer } Instance of Automizer
38+ */
3939 public loadRoot ( location : string ) : this {
4040 return this . loadTemplate ( location )
4141 }
4242
43- /**
44- * Load a template pptx file.
45- * @param {string } location - Filename or path to the template. Will be prefixed with 'templateDir'
46- * @param {string } name - Optional: A short name for the template. If skipped, the template will be named by its location.
47- * @return {Automizer } Instance of Automizer
48- */
43+ /**
44+ * Load a template pptx file.
45+ * @param {string } location - Filename or path to the template. Will be prefixed with 'templateDir'
46+ * @param {string } name - Optional: A short name for the template. If skipped, the template will be named by its location.
47+ * @return {Automizer } Instance of Automizer
48+ */
4949 public load ( location : string , name ?: string ) : this {
5050 name = ( name === undefined ) ? location : name
5151 return this . loadTemplate ( location , name )
@@ -69,12 +69,12 @@ export default class Automizer implements IPresentationProps {
6969 return 'name' in template ;
7070 }
7171
72- /**
73- * Find imported template by given name and return a certain slide by number.
74- * @param {string } name - Name of template; must be imported by Automizer.importTemplate()
75- * @param {number } slideNumber - Number of slide in template presentation
76- * @return {Automizer } Instance of Automizer
77- */
72+ /**
73+ * Find imported template by given name and return a certain slide by number.
74+ * @param {string } name - Name of template; must be imported by Automizer.importTemplate()
75+ * @param {number } slideNumber - Number of slide in template presentation
76+ * @return {Automizer } Instance of Automizer
77+ */
7878 public addSlide ( name : string , slideNumber : number , callback ?: Function ) : this {
7979 if ( this . rootTemplate === undefined ) {
8080 throw new Error ( 'You have to set a root template first.' )
@@ -98,13 +98,13 @@ export default class Automizer implements IPresentationProps {
9898 return this
9999 }
100100
101- public template ( name : string ) : PresTemplate {
102- let template = this . templates . find ( template => template . name === name )
101+ public template ( name : string ) : PresTemplate {
102+ let template = this . templates . find ( template => template . name === name )
103103 if ( template === undefined ) {
104104 throw new Error ( `Template not found: ${ name } ` )
105105 }
106106 return template
107- }
107+ }
108108
109109 public getLocation ( location : string , type ?: string ) : string {
110110 switch ( type ) {
0 commit comments