-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add Javascript licence information automatically #5297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Javascript licence information automatically #5297
Conversation
This commit automates the process of documenting the licenses of Invidious Javascript files through a compile time macro in the licenses.ecr template file. This should hopefully help keep the license documentation up-to-date and allow extensions like LibreJS to always be able to load the latest Javascript files of Invidious. Currently only Invidious's first-party Javascript files are supported. In the future it should be possible to leverage videojs-dependencies.yml to automatically document the Javascript licenses for VideoJS and co. as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking about this after submitting my PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works in its current form, but the quoting around each <tr>
block isn't really necessary. The suggestions here just make it so that you don't have to do that quote-wrapping, and so don't need to escape the quotes inside the here doc.
Unfortunately this approach will break the string interpolation needed for displaying the translated "source" string at runtime |
Ah, well caught. That's a pity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All working correctly on my local
This commit automates the process of documenting the licenses of Invidious Javascript files through a compile time macro in the licenses.ecr template file.
The script it calls is much smaller and does not depend on external IO so Invidious' compile-time is not impacted significantly.
This should hopefully help keep the licence documentation up-to-date and allow extensions like LibreJS to always be able to load the latest Javascript files of Invidious.
Currently only Invidious's first-party Javascript files are supported. In the future it should be possible to leverage videojs-dependencies.yml to automatically document the Javascript licenses for VideoJS and co. as well.
This should be merged after #5292