summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2022-03-25 17:13:28 -0400
committerGravatar GitHub <noreply@github.com> 2022-03-25 17:13:28 -0400
commit046bf7281f720b20b703529bc5d157891e07624c (patch)
treed16685fe8e65e5d1f9e71ad5cdc543819fb505a5
parent7c39389a3fa69780ca16bbbf515b5718dd7688d8 (diff)
downloadastro-046bf7281f720b20b703529bc5d157891e07624c.tar.gz
astro-046bf7281f720b20b703529bc5d157891e07624c.tar.zst
astro-046bf7281f720b20b703529bc5d157891e07624c.zip
refactor: move Prism comp to default exp (#2887)
Diffstat (limited to '')
-rw-r--r--packages/astro-prism/Prism.astro (renamed from packages/astro-prism/component/Prism.astro)2
-rw-r--r--packages/astro-prism/index.js1
-rw-r--r--packages/astro-prism/internal.d.ts (renamed from packages/astro-prism/index.d.ts)0
-rw-r--r--packages/astro-prism/internal.mjs (renamed from packages/astro-prism/index.mjs)0
-rw-r--r--packages/astro-prism/package.json11
-rw-r--r--packages/markdown/remark/src/remark-prism.ts2
6 files changed, 7 insertions, 9 deletions
diff --git a/packages/astro-prism/component/Prism.astro b/packages/astro-prism/Prism.astro
index 66794e2d5..2af5f64ab 100644
--- a/packages/astro-prism/component/Prism.astro
+++ b/packages/astro-prism/Prism.astro
@@ -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 {
diff --git a/packages/astro-prism/index.js b/packages/astro-prism/index.js
new file mode 100644
index 000000000..41974a9d7
--- /dev/null
+++ b/packages/astro-prism/index.js
@@ -0,0 +1 @@
+export { default as Prism } from './Prism.astro'; \ No newline at end of file
diff --git a/packages/astro-prism/index.d.ts b/packages/astro-prism/internal.d.ts
index 058e91da7..058e91da7 100644
--- a/packages/astro-prism/index.d.ts
+++ b/packages/astro-prism/internal.d.ts
diff --git a/packages/astro-prism/index.mjs b/packages/astro-prism/internal.mjs
index 0a118ba1b..0a118ba1b 100644
--- a/packages/astro-prism/index.mjs
+++ b/packages/astro-prism/internal.mjs
diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json
index edf02b4fa..8a4278250 100644
--- a/packages/astro-prism/package.json
+++ b/packages/astro-prism/package.json
@@ -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"
diff --git a/packages/markdown/remark/src/remark-prism.ts b/packages/markdown/remark/src/remark-prism.ts
index 549e09783..6d3e4e664 100644
--- a/packages/markdown/remark/src/remark-prism.ts
+++ b/packages/markdown/remark/src/remark-prism.ts
@@ -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']);