Checking in built Javascript?

Good day!

From the Git histories of various apps I can tell that built Javascript gets checked in, usually under /dist. There are also apps that don’t do that and are apparently released as built archives.

I can’t find a clear guide under Develop for Nextcloud: App development tutorials

How should this be done? Where is this documented?

Best regards.

I’m not aware that we have strict rules or recommendations for that.
Whatever works for you :wink:

This is merely a question about version management and source control.

If you put the final JS build artifacts into the version control, you generate artificial commits where no new feature or stuff was added but just a dependency might brought in some change. This is similar as to add binary compilation artifacts under source control. Some say this is bad practice.

I would say, this is not optimal but if it suits your need and you find it the best solution, go for it. I personally do not commit the build artifacts but just the sources.

One side remark, @kesselb: There is a default .gitignore if you create the boilerplate code. This will exclude the build artifacts by default from git. So, while this is not hard or strict recommendation, I tend to say this is at least a hint towards good practice.