Generate license info in README
Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
This commit is contained in:
Родитель
2294b04f15
Коммит
2c75f66f15
|
@ -81,5 +81,10 @@ Browsers without native [custom element support][support] require a [polyfill][]
|
|||
- Firefox
|
||||
- Safari
|
||||
- Microsoft Edge
|
||||
|
||||
[support]: https://caniuse.com/custom-elementsv1
|
||||
[polyfill]: https://github.com/webcomponents/custom-elements
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the MIT license. See LICENSE for details.
|
|
@ -16,6 +16,7 @@ Browsers without native [custom element support][support] require a [polyfill][]
|
|||
- Firefox
|
||||
- Safari
|
||||
- Microsoft Edge
|
||||
|
||||
[support]: https://caniuse.com/custom-elementsv1
|
||||
[polyfill]: https://github.com/webcomponents/custom-elements`
|
||||
}
|
||||
|
@ -44,6 +45,12 @@ Include with a script tag:
|
|||
\`\`\``
|
||||
}
|
||||
|
||||
function generateLicense() {
|
||||
return `## License
|
||||
|
||||
Distributed under the MIT license. See LICENSE for details.`
|
||||
}
|
||||
|
||||
const escapeHTML = (html) => {
|
||||
return html.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
||||
}
|
||||
|
@ -72,6 +79,7 @@ export function readme(options) {
|
|||
}
|
||||
|
||||
content.push(generateBrowserSupportInstructions())
|
||||
content.push(generateLicense())
|
||||
content.push(footer)
|
||||
|
||||
writeFileSync(filename, content.filter(Boolean).join('\n\n'))
|
||||
|
|
Загрузка…
Ссылка в новой задаче