@@ -104,6 +104,9 @@ let inlineVectorGraphics: boolean = false;
104
104
// Enable 'blacklist by default' route rendering behaviour (each route you wish to render must be marked with `server: true')
105
105
let blacklist : boolean = false ;
106
106
107
+ // The name of files to generate for each route (index.html, eg foo/index.html)
108
+ let filename : string = Files . index ;
109
+
107
110
const renderOptions = ( options ) : OutputOptions => {
108
111
let outputString = options [ 'output' ] ;
109
112
@@ -113,7 +116,7 @@ const renderOptions = (options): OutputOptions => {
113
116
114
117
const output = pathFromString ( outputString ) ;
115
118
116
- return { output, inlineStylesheets, inlineVectorGraphics} ;
119
+ return { filename , output, inlineStylesheets, inlineVectorGraphics} ;
117
120
} ;
118
121
119
122
const createOutput = ( options ) : OutputProducer =>
@@ -134,6 +137,7 @@ const parseCommandLine = () => {
134
137
. option ( '-p, --project <path>' , 'Path to tsconfig.json file or project root (if tsconfig.json lives in the root)' , cwd ( ) )
135
138
. option ( '-w, --webpack <config>' , 'Optional path to webpack configuration file' )
136
139
. option ( '-t, --template <path>' , 'HTML template document' , 'dist/index.html' )
140
+ . option ( '-f, --filename <path>' , 'Change the name of the HTML files that are produced' , filename )
137
141
. option ( '-m, --module <path>' , 'Path to root application module TypeScript file' )
138
142
. option ( '-s, --symbol <identifier>' , 'Class name of application root module' )
139
143
. option ( '-o, --output <path>' , 'Output path to write rendered HTML documents to' , 'dist' )
@@ -160,6 +164,8 @@ const parseCommandLine = () => {
160
164
options . on ( 'pessimistic' ,
161
165
value => pessimistic = value == null ? true : value ) ;
162
166
167
+ options . on ( 'filename' , value => filename = value ) ;
168
+
163
169
return options . parse ( process . argv ) ;
164
170
} ;
165
171
0 commit comments