clean-publish
Advanced tools
Comparing version 3.0.1 to 3.0.2
12
core.js
@@ -120,7 +120,9 @@ import { writeFile, readFile } from 'fs/promises' | ||
let readme = await readFile(readmePath) | ||
let name = repository.match(/[^/]+\/[^/]+$/) | ||
const cleaned = readme.toString().split(/\n##\s*\w/m)[0] + | ||
'\n## Docs\n' + | ||
`Read **[full docs](https://github.com/${name}#readme)** on GitHub.\n` | ||
await writeFile(readmePath, cleaned) | ||
if (repository) { | ||
let name = repository.match(/[^/]+\/[^/]+$/) | ||
const cleaned = readme.toString().split(/\n##\s*\w/m)[0] + | ||
'\n## Docs\n' + | ||
`Read **[full docs](https://github.com/${name}#readme)** on GitHub.\n` | ||
await writeFile(readmePath, cleaned) | ||
} | ||
} |
@@ -36,2 +36,3 @@ export default [ | ||
/^\.remarkrc/, | ||
/README\.[\w-]+\.md/ | ||
] |
{ | ||
"name": "clean-publish", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Clean your package before publish", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17474
532