chore: code formatting
This commit is contained in:
11
.github/scripts/presets_examples.mjs
vendored
11
.github/scripts/presets_examples.mjs
vendored
@@ -1,10 +1,10 @@
|
||||
//Imports
|
||||
import fs from "fs/promises"
|
||||
import processes from "child_process"
|
||||
import yaml from "js-yaml"
|
||||
import sgit from "simple-git"
|
||||
import paths from "path"
|
||||
import sgit from "simple-git"
|
||||
import url from "url"
|
||||
import fs from "fs/promises"
|
||||
|
||||
//Mode
|
||||
const [mode = "dryrun"] = process.argv.slice(2)
|
||||
@@ -56,7 +56,9 @@ for (const path of await fs.readdir(__presets)) {
|
||||
//Readme
|
||||
console.log(`generating: ${preset}/README.svg`)
|
||||
const { name, description } = await yaml.load(await fs.readFile(paths.join(__presets, preset, "preset.yml")))
|
||||
await fs.writeFile(paths.join(__presets, path, "README.md"), `
|
||||
await fs.writeFile(
|
||||
paths.join(__presets, path, "README.md"),
|
||||
`
|
||||
<table>
|
||||
<tr><th><h3>${name}</h3></th></tr>
|
||||
<tr><td align="center"><p>${description}</p></td></tr>
|
||||
@@ -65,7 +67,8 @@ for (const path of await fs.readdir(__presets)) {
|
||||
<img width="900" height="1" alt="">
|
||||
</td></tr>
|
||||
</table>
|
||||
`.trim())
|
||||
`.trim(),
|
||||
)
|
||||
staged.add(paths.join(__presets, path, "README.md"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user