shower / cli

Command line interface for Shower
Other
35 stars 6 forks source link

Template download mechanism #2

Closed mrdimidium closed 6 years ago

mrdimidium commented 6 years ago

Now I just download publicly available `shower ' for every new project.zip ' and unpack it to the desired folder.

This mechanism has 3 big problems:

  1. The format of the `.zip ' hard and long to unpack inside node
  2. You cannot find the version of the template, and this prevents it from being cached
  3. You cannot verify the integrity of a downloaded or cached template

To solve this one would be:

  1. To collect not only zip but a tar archive. Node has powerful tools for working with tar archives.
  2. Generate and put next to `meta ' files.json ' in which to specify the template version, checksum and any other information. This allowed to create a caching tool (taking into account the cache update to new versions), and also to check that the download was correct
pepelsbey commented 6 years ago

There’s build task in shower/shwr.me repository that creates shower.zip (among other things) from dependencies. You can enchance it to build and deploy some other things you might need for CLI.

mrdimidium commented 6 years ago

No longer relevant