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

Allow changing the Houdini generated output directory #1386

Merged
merged 18 commits into from
Dec 3, 2024

Conversation

endigma
Copy link
Contributor

@endigma endigma commented Nov 10, 2024

Fixes #391

Configurable output directory

This PR adds a config value to configure the output directory name for Houdini's generated files ($houdini) by default.

TODO

  • fixup cmd/init to work properly
  • somehow drag config into is_root_route in houdini-svelte/fsPatch
  • update e2e to use .houdini
  • changset?
  • docs update

Copy link

changeset-bot bot commented Nov 10, 2024

🦋 Changeset detected

Latest commit: d161ec7

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

This PR includes changesets to release 8 packages
Name Type
houdini-adapter-static Minor
houdini-svelte Minor
houdini-react Minor
houdini Minor
houdini-plugin-svelte-global-stores Patch
houdini-adapter-auto Patch
houdini-adapter-cloudflare Patch
houdini-adapter-node 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

Copy link

netlify bot commented Nov 10, 2024

Deploy Preview for houdini-docs-next canceled.

Name Link
🔨 Latest commit d161ec7
🔍 Latest deploy log https://app.netlify.com/sites/houdini-docs-next/deploys/6741301167061700086e4247

Copy link

netlify bot commented Nov 10, 2024

Deploy Preview for houdinigraphql canceled.

Name Link
🔨 Latest commit d161ec7
🔍 Latest deploy log https://app.netlify.com/sites/houdinigraphql/deploys/67413011a3f5510008809df8

@SeppahBaws
Copy link
Collaborator

uh-oh, can you add .houdini/ to the gitignore? 😅

@endigma
Copy link
Contributor Author

endigma commented Nov 10, 2024

whoops

@endigma endigma marked this pull request as draft November 10, 2024 18:47
@endigma
Copy link
Contributor Author

endigma commented Nov 11, 2024

Running pnpm test on this branch and main results in the same 2 tests failing, and E2E is failing in GHA on build but this also succeeds locally, any insight?

@endigma endigma force-pushed the endigma-391 branch 2 times, most recently from b40a8e9 to a834ec2 Compare November 14, 2024 16:22
@endigma endigma changed the title initial implementation of changing the output directory Allow changing the Houdini generated output directory Nov 14, 2024
@endigma endigma marked this pull request as ready for review November 14, 2024 19:26
@endigma
Copy link
Contributor Author

endigma commented Nov 14, 2024

sveltejs/kit#13002 blocks fixing the failing test properly but I can just switch the e2e to use the barrel exports. Let me know what you want done. I see a few major options on how to proceed:

  • Disable the client option and merge the plumbing with $houdini as the default
  • Merge as-is, making .houdini the new default and add a note to docs about using the barreled exports
  • Merge, but leaving $houdini as the default for new projects
  • Alternatively, could wait until the SvelteKit bug is addressed to proceed (likely gonna hit a huge merge conflict when it comes time to resurrect unless I go and fix this upstream myself ASAP)

Copy link
Collaborator

@SeppahBaws SeppahBaws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the documentation site to reflect the updated config structure.

packages/houdini-svelte/src/plugin/fsPatch.ts Show resolved Hide resolved
packages/houdini/src/cmd/init.ts Outdated Show resolved Hide resolved
this breaks whatever sveltekit is doing to detemine whether its a file/folder when the path contains a `.` character.
@endigma
Copy link
Contributor Author

endigma commented Nov 21, 2024

Tests should pass now that I've fixed the path resolving bug, and I've updated docs to the best of my knowledge, please let me know if I've done it wrong or if that docs page is somehow autogenerated.

@AlecAivazis AlecAivazis merged commit 3c08996 into HoudiniGraphql:main Dec 3, 2024
15 checks passed
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
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.

Changing the houdini output folder
3 participants