зеркало из
1
0
Форкнуть 0

Generate license info in README

Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
This commit is contained in:
Kristján Oddsson 2022-08-12 11:27:10 +02:00
Родитель 2294b04f15
Коммит 2c75f66f15
2 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -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
[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('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&#039;');
}
@ -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'))