Skip to content

Commit 688cdf4

Browse files
committed
refactor
1 parent dac1813 commit 688cdf4

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

lib/index.cli.js

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -190,25 +190,21 @@ export async function error_exit(...msg) {
190190
})
191191

192192
// Assemble boilerplate
193-
if (argv.assemble)
193+
if (argv.assemble) {
194+
// prettier-ignore
195+
const daisconfig = await fetchdaisconfig(dir)
196+
.catch(e => { throw e })
197+
198+
// prettier-ignore
194199
await Assemble(
195-
await fetchdaisconfig(dir).catch(e => {
196-
throw e
197-
}),
198-
dir,
199-
argv.yes,
200-
argv.offline
201-
).then(
202-
() => {
203-
const text = colors.cyan('Boilerplate Assembled.', 'Happy hacking!')
204-
log.withbox(`
205-
${text[0]}
206-
207-
${text[1]}
208-
`)
209-
},
210-
e => {
211-
throw e
212-
}
213-
)
200+
daisconfig, dir, argv.yes, argv.offline
201+
).catch(e => { throw e })
202+
203+
const text = colors.cyan('Boilerplate Assembled.', 'Happy hacking!')
204+
log.withbox(`
205+
${text[0]}
206+
207+
${text[1]}
208+
`)
209+
}
214210
})().catch(e => error_exit(e))

0 commit comments

Comments
 (0)