Use new imports from ES6 modules
continuous-integration/drone Build is failing Details

This commit is contained in:
Michel Roux 2021-08-24 23:41:04 +02:00
parent 4a57f12921
commit 822a92f6b3
2 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
const fs = require('fs') import fs from 'fs'
const cheerio = require('cheerio') import cheerio from 'cheerio'
const fetch = require('node-fetch') import fetch from 'node-fetch'
const epub = require('epub-gen') import Epub from 'epub-gen'
if (!fs.existsSync('output')) { if (!fs.existsSync('output')) {
fs.mkdirSync('output') fs.mkdirSync('output')
@ -70,7 +70,7 @@ const run = async (url, authors) => {
book.content.push(await fetchPage(link)) book.content.push(await fetchPage(link))
} }
new epub(book) new Epub(book)
}) })
} }

View File

@ -15,5 +15,6 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "7.32.0" "eslint": "7.32.0"
} },
"type": "module"
} }