fix: file name

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2019-04-28 23:48:34 +01:00
parent 299dba89a9
commit e28e7cc767

View File

@ -27,7 +27,7 @@ async function write ({ data, img }, dir) {
try {
await fs.outputJSON(join(dir, 'info.json'), data, { spaces: '\t' })
await fs.outputFile(join(dir, basename(data.img)), img)
await fs.outputFile(join(dir, `image.${extname(data.img)}`), img)
await fs.outputFile(join(dir, `image${extname(data.img)}`), img)
await fs.outputFile(join(dir, 'index.html'), comicPage(data))
} catch (err) {
await fs.remove(dir)