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:
@@ -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`)
|
||||
Reference in New Issue
Block a user