satis icon indicating copy to clipboard operation
satis copied to clipboard

Generate index.html without re-scanning repositories

Open scribu opened this issue 12 years ago • 7 comments

The satis build command does a couple of things:

  1. Scans repositories for new versions.
  2. Generates a packages.json file.
  3. Generates an index.html file.

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.

scribu avatar Oct 13 '13 22:10 scribu

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

scribu avatar Oct 13 '13 22:10 scribu

:+1:

ihor-sviziev avatar Feb 04 '16 15:02 ihor-sviziev

What use-case does this actually answer?

alcohol avatar Oct 20 '16 12:10 alcohol

I presented the usecase in the PR description: developing a custom Satis template, which requires frequent rebuilds.

scribu avatar Oct 20 '16 19:10 scribu

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 avatar Oct 20 '16 19:10 alcohol

@alcohol can't we just chain commands in the build command?

kevindierkx avatar Oct 20 '16 19:10 kevindierkx

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.

alcohol avatar Oct 20 '16 22:10 alcohol