Skip to content
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

Use temporary directory for esbuild #6743

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

erdnaxe
Copy link
Contributor

@erdnaxe erdnaxe commented Nov 5, 2024

This patch proposes to move <root>/var/js/ to a temporary directory.

This simplifies the setup for system administrators as they no longer have to give special permissions to the user running Etherpad on var/js/ folder. It is also required for packaging Etherpad in NixPkgs: NixOS/nixpkgs#353814.

@SamTV12345
Copy link
Member

Thanks for the pull request :) . I improved it a bit by ditching writing to disk. Our JavaScript files are like a few kilobytes so writing to disk isn't necessary and we can easily regenerate them at startup.

@SamTV12345 SamTV12345 merged commit 9869946 into ether:develop Nov 5, 2024
21 checks passed
@erdnaxe
Copy link
Contributor Author

erdnaxe commented Nov 6, 2024

Thank you for the review!

I noticed you reverted resolveDir: path.join(settings.root, 'var','js'), in your commit, which means that ./var/js/ folder is used but never written into. Couldn't we resolveDir: settings.root in esbuild configuration? Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants