rixo / svelte-template-hot

Copy of official Svelte template with added HMR support
61 stars 9 forks source link

Merge from upstream official template #10

Closed frederikhors closed 4 years ago

frederikhors commented 4 years ago

I merged from upstream official template.

As you asked in https://github.com/rixo/svelte-template-hot/pull/7.

Note that I have left the semicolons and indentation as this makes it easier to see the diff in the future when we re-merge.

rixo commented 4 years ago

Great! Thanks for the contribution :)

I considered the semicolons very hard but couldn't make myself to keep them. I can't get myself to like having useless things around in my code... Same for a few other stylistic preference. What's the point of having a personal project if I can't use it as a platform to advocate for my own best coding style, huh?

If this was too easy for you and you're after a bigger challenge, there's the same to be made in rollup-plugin-svelte-hot. If I remember correctly, I've tried to be more scrupulous to preserve the style of the existing files there. But there will probably be more conflict resolution to do, I'm under the impression that the official plugin has moved quite a lot recently.

frederikhors commented 4 years ago

I considered the semicolons very hard but couldn't make myself to keep them. I can't get myself to like having useless things around in my code... Same for a few other stylistic preference. What's the point of having a personal project if I can't use it as a platform to advocate for my own best coding style, huh?

I agree with you 100%. Do you use StandardJS for this?

there's the same to be made in rollup-plugin-svelte-hot

I'll do it in the next few hours.

rixo commented 4 years ago

I first quit semicolons because of StandarJS but not really using it. I've learned to not care too much about coding style beyond indentation and obvious legibility violations (things like 200 chars lines...). I love Prettier for the same idea as StandardJS, of having strict rules to prevent too much bikeshedding, but Prettier also enforces it automatically, and very reliably.

Regarding rollup-plugin-svelte-hot.... First, thanks for you help, it's appreciated :) I've had to look into it just yesterday it has been merged more recently than I thought. There's not much currently. Well, often and small is still preferable than big scary merges after much diversion. I think the more troublesome point in there is the CHANGELOG. With the slightly special status of the project (remaining close to original), I don't really know how this should be best tackled :thinking: