@@ -13,6 +13,7 @@ const convertOptions = (args, attrs) => {
13
13
const baseDir = args [ 'base-dir' ]
14
14
const destinationDir = args [ 'destination-dir' ]
15
15
const outFile = args [ 'out-file' ]
16
+ const templateDir = args [ 'template-dir' ]
16
17
const templateEngine = args [ 'template-engine' ]
17
18
const quiet = args . quiet
18
19
const verbose = args . verbose
@@ -38,6 +39,7 @@ const convertOptions = (args, attrs) => {
38
39
console . log ( 'trace ' + trace )
39
40
console . log ( 'base-dir ' + baseDir )
40
41
console . log ( 'destination-dir ' + destinationDir )
42
+ console . log ( 'template-dir ' + templateDir )
41
43
console . log ( 'template-engine ' + templateEngine )
42
44
}
43
45
const verboseMode = quiet ? 0 : verbose ? 2 : 1
@@ -70,7 +72,12 @@ const convertOptions = (args, attrs) => {
70
72
if ( destinationDir != null ) {
71
73
options . to_dir = destinationDir
72
74
}
73
- options . template_engine = templateEngine
75
+ if ( templateDir ) {
76
+ options . template_dirs = templateDir
77
+ }
78
+ if ( templateEngine ) {
79
+ options . template_engine = templateEngine
80
+ }
74
81
if ( typeof outFile !== 'undefined' ) {
75
82
if ( outFile === '' ) {
76
83
options . to_file = '-'
@@ -188,6 +195,12 @@ class Options {
188
195
describe : 'enable timings mode' ,
189
196
type : 'boolean'
190
197
} )
198
+ . option ( 'template-dir' , {
199
+ alias : 'T' ,
200
+ array : true ,
201
+ describe : 'a directory containing custom converter templates that override the built-in converter (may be specified multiple times)' ,
202
+ type : 'string'
203
+ } )
191
204
. option ( 'template-engine' , {
192
205
alias : 'E' ,
193
206
describe : 'template engine to use for the custom converter templates' ,
@@ -217,6 +230,7 @@ show this usage if TOPIC is not specified or recognized
217
230
show an overview of the AsciiDoc syntax if TOPIC is syntax` ,
218
231
type : 'string'
219
232
} )
233
+ . nargs ( 'template-dir' , 1 )
220
234
. nargs ( 'attribute' , 1 )
221
235
. nargs ( 'require' , 1 )
222
236
. usage ( `$0 [options...] files...
0 commit comments