Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] make template filenames clearer #1878

Merged
merged 3 commits into from
Jul 12, 2021
Merged

[feat] make template filenames clearer #1878

merged 3 commits into from
Jul 12, 2021

Conversation

ignatiusmb
Copy link
Member

Resolves #1874

@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2021

🦋 Changeset detected

Latest commit: 0afbad2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann
Copy link
Member

I totally agree with the Counter rename. src/lib/svelte-logo.svg doesn't quite seem like where I'd put that file. It made sense that it was grouped with Header in the Header folder before. In my own project I've created src/images with an $img alias

@dummdidumm
Copy link
Member

I prefer not to introduce another alias in the default template, so I prefer to keep it as proposed here.

@benmccann
Copy link
Member

Or should we just keep it as in master? I don't think it's a good pattern to encourage people to stick all their images directly in $lib

@dummdidumm
Copy link
Member

How about leaving the header folder as is and only rename the file in it? So it would be import Counter from "$lib/counter/Counter.svelte", which is fine for me

@benmccann
Copy link
Member

I think lib/Counter.svelte as it is in this PR makes sense. No need for a sub-directory when there's only a single file in it. You could use that naming scheme for Header though. The sub-directory makes more sense there since there are two files in it

@ignatiusmb ignatiusmb changed the title [feat] simplify template components [feat] make template filenames clearer Jul 12, 2021
@ignatiusmb
Copy link
Member Author

That is probably the sweet spot, we'll provide both ways and users can see and choose for themselves which one they prefer later.

@benmccann benmccann merged commit fe68e13 into sveltejs:master Jul 12, 2021
@ignatiusmb ignatiusmb deleted the i1874/simplify-filenames branch July 12, 2021 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too many index.svelte files in SvelteKit demo app
3 participants