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

Adapter API to parse ignore files to warn of suggested ignores #2258

Open
jthegedus opened this issue Aug 21, 2021 · 2 comments
Open

Adapter API to parse ignore files to warn of suggested ignores #2258

jthegedus opened this issue Aug 21, 2021 · 2 comments
Labels
adapters - general Support for functionality general to all adapters feature / enhancement New feature or request p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Milestone

Comments

@jthegedus
Copy link
Contributor

jthegedus commented Aug 21, 2021

Describe the problem

Different adapters require different ignore settings.

The current proposed soln that is in use today is for all adapter output to be under .svelte-kit/<somedir> though this may change in future per adapter.

The proposed solution would provide adapter authors with an alternative.

Describe the proposed solution

Use gitignore-parser to let Adapters to loudly warn users. From this exchange:

Should we expect to see gitignore-parser provided via the Adapter API in the near future?

Yes, I think we should — we could have an API like utils.warn_if_unignored([opts.output])

Alternatives considered

Writing this in my documentation

Importance

would make my life easier

Additional Information

raising the issues:

initial proposition:

revert of initial proposition

@benmccann
Copy link
Member

https://kit.svelte.dev/docs#writing-an-adapter says:

If possible, we recommend putting the adapter output under the build/ directory with any intermediate output placed under '.svelte-kit/' + adapterName.

Unfortunately it hasn't always been possible. We had to move some of the Netlify output to be under .netlify

@jthegedus
Copy link
Contributor Author

kit.svelte.dev/docs#writing-an-adapter says:

If possible, we recommend putting the adapter output under the build/ directory with any intermediate output placed under '.svelte-kit/' + adapterName.

Unfortunately it hasn't always been possible. We had to move some of the Netlify output to be under .netlify

Yes, this cannot always be achieved. If the adapter reads the platform config (netlify.toml, firebase.json etc) to determine where to put the final build output, then a way to warn about ignoring is required.

A key point to highlight, and that I think is missed in a lot of the Kit > PlatformX conversations, is the idea that Kit is the only App & owner of all APIs hosted on PlatformX. For instance, a single Firebase project can house many Android, iOS, Web apps and APIs all from the same firebase.json config, which is why the Firebase Adapter cannot simply put everything in build/ nor that build/ is even at the root of the Firebase project. But also, does not mean the user wants to commit the final build output wherever it lives.

@ignatiusmb ignatiusmb added adapters - general Support for functionality general to all adapters feature / enhancement New feature or request labels Aug 24, 2021
@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 26, 2022
@benmccann benmccann added the p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. label Jul 29, 2022
@Rich-Harris Rich-Harris modified the milestones: 1.0, post-1.0 Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters - general Support for functionality general to all adapters feature / enhancement New feature or request p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc.
Projects
None yet
Development

No branches or pull requests

4 participants