app-tutorial icon indicating copy to clipboard operation
app-tutorial copied to clipboard

Do not include js in the repository

Open max-nextcloud opened this issue 2 years ago • 2 comments

This tutorial should be used to develop apps that will most likely not be shipped with the server. So there's no need to include the compiled js.

We should avoid including the js in the repo when possible because:

  • It leads to conflicts on rebases that would otherwise be smooth.
  • It requires rebuilding the js as a production build for every pull request.
  • It requires additional consistency checks in ci to ensure js is updated.
  • It increases the repo size significantly.

max-nextcloud avatar Feb 10 '23 08:02 max-nextcloud

I think ´js/` is included so users can directly test it without installing node dependencies and building the js assets: https://github.com/nextcloud/app-tutorial#try-it

susnux avatar Feb 15 '23 22:02 susnux

I think ´js/` is included so users can directly test it without installing node dependencies and building the js assets: https://github.com/nextcloud/app-tutorial#try-it

Good point. On the other hand if you want to make changes you will need to compile the js anyway. And if people use this as a template for their own app they will start with an included js which can be annoying.

So I agree... not an obvious decision here.

max-nextcloud avatar Feb 20 '23 09:02 max-nextcloud