Skip to content

Commit 98b2f75

Browse files
committed
Enable custom AppleScript on Demo
1 parent 958d67f commit 98b2f75

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/demo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@types/node": "^18.15.11",
20+
"@types/prismjs": "^1.26.0",
2021
"@types/react": "^18.0.28",
2122
"@types/react-dom": "^18.0.11",
2223
"@vitejs/plugin-react": "^3.1.0",

packages/demo/src/App.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import { Highlight, /* Prism, */ themes } from "prism-react-renderer"
1+
import { Highlight, Prism, themes } from "prism-react-renderer"
22
import styles from "./app.module.css"
33
import clsx from "clsx"
44
import { ProjectBadge } from "formidable-oss-badges"
55
import { useState } from "react"
66
import { sampleCode } from "./sample-code"
77

88
// Example of importing a custom language directly from Prism
9-
// typeof window !== "undefined" && (window.Prism = Prism)
10-
// await import("prismjs/components/prism-applescript")
9+
typeof window !== "undefined" && (window.Prism = Prism)
10+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
11+
// @ts-ignore
12+
await import("prismjs/components/prism-applescript")
1113

1214
type SampleCodeType = keyof typeof sampleCode
1315
type ThemeType = keyof typeof themes

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)