-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Refactor: move prism to @astrojs/prism/components
#2878
Conversation
🦋 Changeset detectedLatest commit: 9fa7127 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
0f0b14d
to
e63a0e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments
packages/astro-prism/package.json
Outdated
"exports": { | ||
".": "./index.mjs" | ||
".": "./index.mjs", | ||
"./components": "./components/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, but just @astrojs/prism/component
with no (s)? There's not going to be multiple of these are there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not! I really wanted to export from index.mjs
but I can't figure out putting .astro
files and ESM exports in the same file... Let me know if this is possible (without building the .astro
file to JS of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: changed to a default export:
import Prism from '@astrojs/prism/component';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i was thinking that from the main would be nice but can't really do that, too bad. This works fine though, thanks!
This is more than enough for now, but whenever we go to expose this to users I think the I know this package is already doing double-duty, But, if the
|
* feat: add `<Prism/>` to @astrojs/prism/components * feat: remove `<Prism/>` from astro/components * refactor: point to index.mjs in import * refactor: change exp to @astrojs/prism/component * refactor: remove unecessary index.js * chore: changeset
Changes
<Prism/>
component as default export from@astrojs/prism/component
<Prism/>
component fromastro/components
☝️ Open to avoiding removal if we prefer. I think adding this component to
@astrojs/prism
could aid in the 1.0 beta move though.Testing
N/A
Docs
withastro/docs#256