Generate index.html without re-scanning repositories
The satis build command does a couple of things:
- Scans repositories for new versions.
- Generates a
packages.jsonfile. - Generates an
index.htmlfile.
When tweaking the Twig template for index.html, it would be useful to have a command for only doing step 3, or at least to avoid doing step 1, which can take a long time.
This would require reading the packages from a previously generated packages.json file.
And it could be exposed as a flag: satis build --no-scan
:+1:
What use-case does this actually answer?
I presented the usecase in the PR description: developing a custom Satis template, which requires frequent rebuilds.
When I adjusted the current template I just used a Satis configuration with one or two packages. Only took a few seconds to regenerate every time. So to be honest, I do not see a lot of need for a feature that barely serves a purpose. Means more complexity, and more functionality, that we have to keep maintaining. Not sure if that is worth it.
@alcohol can't we just chain commands in the build command?
It's not very decoupled right now. It will need some cleanup. It might be easier to implement something like this then. Right now the html generation is not done based on the json, but based on the selected packages. From this list of packages, both the json and html are generated. This means that in order to generate the html right now, we always have to scan all repositories. It does not have the capability to just parse the existing json.