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

docs: prefer snake_case for preset names #1499

Merged
merged 4 commits into from
Aug 6, 2023
Merged

Conversation

marshallswain
Copy link
Contributor

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This updates the preset for Cloudflare Pages to be named cloudflare_pages instead of cloudflare-pages. This brings the name inline with the one on the https://nitro.unjs.io/deploy page and actually works when deploying to Cloudflare Pages.

I have to set cloudflare_pages in my nuxt.config.ts in order for this preset to work. I assume that means that the preset should be underscored and not dashed like cloudflare-pages. If I use cloudflare-pages instead of cloudflare_pages, the dist directory does not get created.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

I have to set `cloudflare_pages` in my `nuxt.config.ts` in order for this preset to work.  I assume that means that the preset should be underscored and not dashed like `cloudflare-pages`.
@nuxt-studio
Copy link
Contributor

nuxt-studio bot commented Jul 28, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio β†—οΈŽ View Live Preview df1c465

@Hebilicious Hebilicious added the documentation Improvements or additions to documentation label Jul 28, 2023
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #1499 (4f1ad07) into main (fddf57e) will increase coverage by 0.03%.
Report is 21 commits behind head on main.
The diff coverage is n/a.

❗ Current head 4f1ad07 differs from pull request most recent head df1c465. Consider uploading reports for the commit df1c465 to get more accurate results

@@            Coverage Diff             @@
##             main    #1499      +/-   ##
==========================================
+ Coverage   76.25%   76.28%   +0.03%     
==========================================
  Files          73       73              
  Lines        7453     7540      +87     
  Branches      733      739       +6     
==========================================
+ Hits         5683     5752      +69     
- Misses       1769     1787      +18     
  Partials        1        1              

see 7 files with indirect coverage changes

@Hebilicious
Copy link
Member

nitro.preset set to cloudflare-pages works for me. Can you please provide a reproduction for where it doesn't ?

@pi0
Copy link
Member

pi0 commented Aug 6, 2023

Thanks for PR @marshallswain . As @Hebilicious pointed out, there is no difference in two casings because we use camel case normalization using unjs/scule and it handles both casings...

However i think as a general best practice, underscores are safer to be in docs πŸ‘πŸΌ (refactoring to reflect other pages too)

@pi0 pi0 changed the title docs: fix cloudflare_pages preset name docs: prefer snake_case for preset names Aug 6, 2023
@pi0 pi0 merged commit 309c000 into unjs:main Aug 6, 2023
5 of 6 checks passed
@marshallswain marshallswain deleted the patch-1 branch August 11, 2023 16:46
@pi0 pi0 mentioned this pull request Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants