refactor: move Prism comp to default exp (#2887)

This commit is contained in:
Ben Holmes 2022-03-25 17:13:28 -04:00 committed by GitHub
parent 7c39389a3f
commit 046bf7281f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,6 @@
---
import Prism from 'prismjs';
import { addAstro } from '../index.mjs';
import { addAstro } from './internal.mjs';
import loadLanguages from 'prismjs/components/index.js';
export interface Props {

View file

@ -0,0 +1 @@
export { default as Prism } from './Prism.astro';

View file

@ -11,16 +11,13 @@
"directory": "packages/astro-prism"
},
"homepage": "https://astro.build",
"main": "index.mjs",
"main": "index.js",
"scripts": {},
"files": [
"component"
],
"exports": {
".": "./index.mjs",
"./component": "./component/Prism.astro"
".": "./index.js",
"./internal": "./internal.mjs"
},
"types": "./index.d.ts",
"types": "./internal.d.ts",
"keywords": [],
"devDependencies": {
"prismjs": "^1.27.0"

View file

@ -1,6 +1,6 @@
import { visit } from 'unist-util-visit';
import Prism from 'prismjs';
import { addAstro } from '@astrojs/prism';
import { addAstro } from '@astrojs/prism/internal';
import loadLanguages from 'prismjs/components/index.js';
const noVisit = new Set(['root', 'html', 'text']);