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:
parent
f5b48bc0ae
commit
2db97f10dc
4 changed files with 12 additions and 3 deletions
6
.changeset/perfect-ravens-count.md
Normal file
6
.changeset/perfect-ravens-count.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
'@astrojs/prism': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Move the built-in `Prism` component from `astro/components` to `@astrojs/prism/component`.
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import Prism from 'prismjs';
|
import Prism from 'prismjs';
|
||||||
import { addAstro } from '@astrojs/prism';
|
import { addAstro } from '../index.mjs';
|
||||||
import loadLanguages from 'prismjs/components/index.js';
|
import loadLanguages from 'prismjs/components/index.js';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
|
@ -13,8 +13,12 @@
|
||||||
"homepage": "https://astro.build",
|
"homepage": "https://astro.build",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
|
"files": [
|
||||||
|
"component"
|
||||||
|
],
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.mjs"
|
".": "./index.mjs",
|
||||||
|
"./component": "./component/Prism.astro"
|
||||||
},
|
},
|
||||||
"types": "./index.d.ts",
|
"types": "./index.d.ts",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
export { default as Code } from './Code.astro';
|
export { default as Code } from './Code.astro';
|
||||||
export { default as Debug } from './Debug.astro';
|
export { default as Debug } from './Debug.astro';
|
||||||
export { default as Markdown } from './Markdown.astro';
|
export { default as Markdown } from './Markdown.astro';
|
||||||
export { default as Prism } from './Prism.astro';
|
|
||||||
|
|
Loading…
Reference in a new issue