Fix a docs generation bug [skip ci]

This commit is contained in:
Isiah Meadows 2019-08-18 14:51:44 -04:00
parent caef6a8f09
commit 9b1155c4aa
4 changed files with 4 additions and 127 deletions

View file

@ -2,7 +2,7 @@
process.on("unhandledRejection", function (e) {
process.exitCode = 1
if (!e.stdout || !e.stderr) return false
if (!e.stdout || !e.stderr) throw e
console.error(e.stack)
if (e.stdout && e.stdout.length) {
@ -12,7 +12,8 @@ process.on("unhandledRejection", function (e) {
console.error(e.stderr.toString("utf-8"))
}
return true
// eslint-disable-next-line no-process-exit
process.exit()
})
module.exports = ({exec, watch}) => {

View file

@ -5,7 +5,6 @@ const path = require("path")
const {promisify} = require("util")
const marked = require("marked")
const rimraf = promisify(require("rimraf"))
const copy = require("recursive-copy")
const {execFileSync} = require("child_process")
const escapeRegExp = require("escape-string-regexp")
const HTMLMinifier = require("html-minifier")
@ -174,7 +173,7 @@ class Generator {
await init(dest)
})
if ((/\.(md|html)$/).test(file)) {
if (!(/\.(md|html)$/).test(file)) {
await archived(relative, (dest) => fs.copyFile(file, dest))
console.log(`Copied: ${relative}`)
}
@ -211,7 +210,6 @@ class Generator {
async generate() {
await this.generateRec(r("docs"))
await copy(r(`dist/archive/v${this._version}`), r("dist"))
// Just ensure it exists.
await (await fs.open(r("dist/.nojekyll"), "a")).close()
}