#842 add mediatag code generator script #846
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #842 code for www/common/media-tag-nacl.min.js is missing. Instead of maintaining significant code duplication for media-tag functionality from within the UI and for embedding on 3rd party sites, it makes much more sense to compile this script from all the requirements.
Although it would be cleanest to remove www/common/media-tag-nacl.min.js from the repository altogether (putting it into .gitignore) and recompiling it as part of the cryptpad installation process, I instead added the autogenerated media-tag-nacl.min.js to the repo, as this does not require changes to any deploy/docker scripts or the installation procedure.
Even if the file were to be auto-generated by server.js on startup, the folder it resides in might not have write-access on production sites, and auto-compiling the file on every request/serving it dynamically would probably invoke too much overhead.
As such this seemed to be the cleanest and easiest solution for now, with the future option to purge the file from the repo in the process of a more wholesome installation procedure overhaul (including a compilation phase as part of the setup procedure)