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

Renaming to import.meta.fetchContent #70

Merged
merged 5 commits into from
Apr 12, 2021
Merged

Renaming to import.meta.fetchContent #70

merged 5 commits into from
Apr 12, 2021

Conversation

drwpow
Copy link
Member

@drwpow drwpow commented Apr 9, 2021

Changes

Identical to #68, except we rename import.meta.glob to import.meta.fetchContent. A few reasons:

  • With the addition of the createContext() API, we thought we could use import.meta.glob to load markdown. Turns out that it‘s very unwieldy when you want a magic function to load your content
  • In addition to that, it actually blocks Snowpack‘s usage of import.meta.glob, which isn‘t great (what if you actually wanted that?)

Made as a separate branch from #68 as to not disrupt demos.

Testing

  • Tests are passing
  • Tests updated where necessary

Docs

  • Docs / READMEs updated
  • Code comments added where helpful

@@ -0,0 +1,20 @@
/**
* Codegen utils
Copy link
Contributor

Choose a reason for hiding this comment

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

Happy to see codegen split up a little bit.

Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

lgtm

@drwpow drwpow force-pushed the fetch-collections branch 3 times, most recently from dcbd134 to 70c8ad5 Compare April 9, 2021 18:32
Change of plans—maintain parity with Snowpack and Vite because our Collections API will use a different interface
@drwpow drwpow merged commit 3639190 into main Apr 12, 2021
@drwpow drwpow deleted the fetch-collections branch April 12, 2021 23:21
@drwpow drwpow mentioned this pull request Apr 12, 2021
7 tasks
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.

None yet

2 participants