Skip to content

Commit

Permalink
Refactor: move prism to @astrojs/prism/components (#2878)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bholmesdev authored Mar 24, 2022
1 parent f5b48bc commit 2db97f1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/perfect-ravens-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'astro': patch
'@astrojs/prism': patch
---

Move the built-in `Prism` component from `astro/components` to `@astrojs/prism/component`.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Prism from 'prismjs';
import { addAstro } from '@astrojs/prism';
import { addAstro } from '../index.mjs';
import loadLanguages from 'prismjs/components/index.js';
export interface Props {
Expand Down
6 changes: 5 additions & 1 deletion packages/astro-prism/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
"homepage": "https://astro.build",
"main": "index.mjs",
"scripts": {},
"files": [
"component"
],
"exports": {
".": "./index.mjs"
".": "./index.mjs",
"./component": "./component/Prism.astro"
},
"types": "./index.d.ts",
"keywords": [],
Expand Down
1 change: 0 additions & 1 deletion packages/astro/components/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as Code } from './Code.astro';
export { default as Debug } from './Debug.astro';
export { default as Markdown } from './Markdown.astro';
export { default as Prism } from './Prism.astro';

0 comments on commit 2db97f1

Please sign in to comment.