@@ -121,16 +121,16 @@ module.exports = (api, options) => {
121
121
// Mock data from legacy build
122
122
const pages = options . pages || { index : '' }
123
123
Object . keys ( pages ) . forEach ( ( page ) => {
124
- let pagePath
125
124
// Use the filename option and fallback to the key
126
- pagePath = path . parse ( pages [ page ] . filename || page )
125
+ const pagePath = path . parse ( pages [ page ] . filename || page )
127
126
pagePath . name = `legacy-assets-${ pagePath . name || page } `
128
127
pagePath . ext = '.html.json'
129
128
// Delete the base so that name/ext is used when formatting
130
129
delete pagePath . base
131
130
// Make sure parent dir exists
132
- if ( pagePath . dir )
131
+ if ( pagePath . dir ) {
133
132
fs . ensureDirSync ( path . join ( bundleOutputDir , pagePath . dir ) )
133
+ }
134
134
fs . writeFileSync (
135
135
path . join ( bundleOutputDir , path . format ( pagePath ) ) ,
136
136
'[]'
@@ -232,7 +232,7 @@ module.exports = (api, options) => {
232
232
buildApp ( )
233
233
}
234
234
}
235
- function buildApp ( ) {
235
+ function buildApp ( ) {
236
236
info ( 'Building app with electron-builder:' )
237
237
// Build the app using electron builder
238
238
builder
@@ -429,7 +429,7 @@ module.exports = (api, options) => {
429
429
} )
430
430
}
431
431
432
- async function launchElectron ( ) {
432
+ async function launchElectron ( ) {
433
433
firstBundleCompleted = true
434
434
// Don't exit process when electron is killed
435
435
if ( child ) {
@@ -520,7 +520,7 @@ module.exports = (api, options) => {
520
520
}
521
521
}
522
522
523
- function onChildExit ( ) {
523
+ function onChildExit ( ) {
524
524
process . exit ( 0 )
525
525
}
526
526
}
@@ -567,7 +567,7 @@ module.exports = (api, options) => {
567
567
)
568
568
}
569
569
570
- function bundleMain ( {
570
+ function bundleMain ( {
571
571
mode,
572
572
api,
573
573
args,
0 commit comments