diete-design / diete.design

https://diete.design
MIT License
0 stars 0 forks source link

Versioning components #40

Open agazso opened 2 weeks ago

agazso commented 2 weeks ago

As the expected way of using the components is making a copy of the code from the website, there is no easy way to see if there are fixes or new features for a component.

I think it would make sense for each component to have its own version, that would be incremented any time the component were updated. Also a changelog would be great to see what has changed.

The version could be either in a variable or in a comment or both.

Initially I think it would be enough to do this manually, because I don't expect that the components would change a lot. But if that's the case this can be always automated with some tooling.

Wdyt?

vojtechsimetka commented 1 week ago

I quite like this idea! I would like it to be in the component itself as a first thing.

We can either do:

<!-- v1.0.2 >

<script>
...
</script>
...

Or

<script>
  /* v1.0.2 */
  ...
</script>
...

Slight preference for the first variant but we may need to reconfigure linter/prettier.