Refactor: move prism to @astrojs/prism/components (#2878)

* 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
This commit is contained in:
Ben Holmes 2022-03-24 17:48:07 -04:00 committed by GitHub
parent f5b48bc0ae
commit 2db97f10dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View file

@ -0,0 +1,6 @@
---
'astro': patch
'@astrojs/prism': patch
---
Move the built-in `Prism` component from `astro/components` to `@astrojs/prism/component`.

View file

@ -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 {

View file

@ -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": [],

View file

@ -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';