Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit 569b7d3

Browse files
committed
fix(web): remove npm prismjs package
1 parent e47e4da commit 569b7d3

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

package-lock.json

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

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"framer-motion": "^4.1.17",
2020
"i18next": "^20.6.1",
2121
"notistack": "^2.0.2",
22-
"prismjs": "^1.25.0",
2322
"react": "^17.0.2",
2423
"react-dom": "^17.0.2",
2524
"react-hook-form": "^7.15.3",
@@ -28,7 +27,6 @@
2827
},
2928
"devDependencies": {
3029
"@emotion/serialize": "^1.0.2",
31-
"@types/prismjs": "^1.16.6",
3230
"@types/reach__router": "^1.3.9",
3331
"@types/react": "^17.0.21",
3432
"@types/react-dom": "^17.0.9",

src/pages/Publish.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import React, { useState, useEffect } from 'react'
22
import { Button, Fab, Switch, TextField } from '@mui/material'
33
import { Container, Paper } from '@mui/material'
44
import { Controller, useForm } from 'react-hook-form'
5-
import { highlight, languages } from 'prismjs'
5+
// import { highlight, languages } from 'prismjs'
66

77
import 'twin.macro'
8-
import 'prismjs/components/prism-clike'
9-
import 'prismjs/components/prism-javascript'
10-
import 'prismjs/components/prism-markup'
11-
import 'prismjs/components/prism-css'
8+
// import 'prismjs/components/prism-clike'
9+
// import 'prismjs/components/prism-javascript'
10+
// import 'prismjs/components/prism-markup'
11+
// import 'prismjs/components/prism-css'
1212

1313
import AddIcon from '@mui/icons-material/Add'
1414
import Editor from 'react-simple-code-editor'
@@ -81,10 +81,12 @@ function Publish(props: RouteComponentProps) {
8181
</div>
8282
<div tw="my-4 min-w-[800px] max-w-[800px]">
8383
<Paper variant="outlined">
84+
{/* TODO replace editor with multiline textarea input */}
8485
<Editor
8586
value={text}
8687
onValueChange={(text) => setText(text)}
87-
highlight={(text) => highlight(text, languages.markup, 'markup')}
88+
highlight={(text) => text}
89+
// highlight={(text) => highlight(text, languages.markup, 'markup')}
8890
padding={14}
8991
tabSize={4}
9092
insertSpaces={true}

0 commit comments

Comments
 (0)