3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Copy the README tagline to the npm description at publish; name Jira and Confluence in it

This commit is contained in:
2026-11-08 10:52:48 +01:00
committed by Lillem4n
parent db243b6d73
commit c3f10b5175
7 changed files with 65 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
import { readFileSync, writeFileSync } from 'node:fs'
import { readmeTagline } from './tagline.mjs'
const packagePath = new URL('../package.json', import.meta.url)
const tagline = readmeTagline(readFileSync(new URL('../README.md', import.meta.url), 'utf8'))
if (!tagline.ok) {
console.error(tagline.error)
process.exit(1)
}
const manifest = JSON.parse(readFileSync(packagePath, 'utf8'))
writeFileSync(packagePath, `${JSON.stringify({ ...manifest, description: tagline.value }, null, 2)}\n`)