mirror of
https://github.com/withastro/astro.git
synced 2025-01-23 02:51:53 -05:00
refactor: move Prism comp to default exp (#2887)
This commit is contained in:
parent
7c39389a3f
commit
046bf7281f
6 changed files with 7 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import Prism from 'prismjs';
|
import Prism from 'prismjs';
|
||||||
import { addAstro } from '../index.mjs';
|
import { addAstro } from './internal.mjs';
|
||||||
import loadLanguages from 'prismjs/components/index.js';
|
import loadLanguages from 'prismjs/components/index.js';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
1
packages/astro-prism/index.js
Normal file
1
packages/astro-prism/index.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export { default as Prism } from './Prism.astro';
|
|
@ -11,16 +11,13 @@
|
||||||
"directory": "packages/astro-prism"
|
"directory": "packages/astro-prism"
|
||||||
},
|
},
|
||||||
"homepage": "https://astro.build",
|
"homepage": "https://astro.build",
|
||||||
"main": "index.mjs",
|
"main": "index.js",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"files": [
|
|
||||||
"component"
|
|
||||||
],
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.mjs",
|
".": "./index.js",
|
||||||
"./component": "./component/Prism.astro"
|
"./internal": "./internal.mjs"
|
||||||
},
|
},
|
||||||
"types": "./index.d.ts",
|
"types": "./internal.d.ts",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prismjs": "^1.27.0"
|
"prismjs": "^1.27.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { visit } from 'unist-util-visit';
|
import { visit } from 'unist-util-visit';
|
||||||
import Prism from 'prismjs';
|
import Prism from 'prismjs';
|
||||||
import { addAstro } from '@astrojs/prism';
|
import { addAstro } from '@astrojs/prism/internal';
|
||||||
import loadLanguages from 'prismjs/components/index.js';
|
import loadLanguages from 'prismjs/components/index.js';
|
||||||
const noVisit = new Set(['root', 'html', 'text']);
|
const noVisit = new Set(['root', 'html', 'text']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue