Fuse the command boilerplate into the relative subcommands

This commit is contained in:
Claudia Meadows 2024-09-01 06:35:08 -07:00
parent 0d095d1373
commit 5af0693fea
No known key found for this signature in database
GPG key ID: C86B594396786760
4 changed files with 47 additions and 85 deletions

View file

@ -7,13 +7,14 @@
// - https://github.com/MithrilJS/mithril.js/issues/2417
// - https://github.com/MithrilJS/mithril.js/pull/2422
require("./_improve-rejection-crashing.js")
const path = require("path")
const {execFileSync} = require("child_process")
const ghPages = require("gh-pages")
const upstream = require("./_upstream")
const generate = require("./generate-docs")
module.exports = update
async function update() {
await generate()
const commit = execFileSync("git", ["rev-parse", "--verify", "HEAD"], {
@ -38,7 +39,4 @@ async function update() {
console.log("Published!")
}
/* eslint-disable global-require */
if (require.main === module) {
require("./_command")({exec: update})
}
update()