Skip to content

Commit

Permalink
chore(example-app): update project configuration and dependencies
Browse files Browse the repository at this point in the history
- Modified package.json to update dependencies
- Renamed vite.config.ts to vite.config.mjs for compatibility
- Updated App.tsx and yarn.lock for new features
  • Loading branch information
alioguzhan committed Dec 30, 2024
1 parent b0cf594 commit 7392a1a
Show file tree
Hide file tree
Showing 4 changed files with 751 additions and 563 deletions.
26 changes: 13 additions & 13 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"license": "MIT",
"private": true,
"dependencies": {
"@types/jest": "^29.5.0",
"@types/node": "^18.15.9",
"@types/react": "^18.0.29",
"@types/react-dom": "^18.0.11",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"prop-types": "^15.8.1",
"react": "link:../node_modules/react",
"react-dom": "link:../node_modules/react-dom",
"react-editext": "link:..",
"react-syntax-highlighter": "^15.5.0",
"styled-components": "^5.3.9",
"typescript": "^5.0.2"
"react-syntax-highlighter": "^15.6.1",
"styled-components": "^6.1.13",
"typescript": "^5.7.2"
},
"scripts": {
"dev": "vite",
Expand All @@ -31,11 +31,11 @@
],
"snyk": true,
"devDependencies": {
"@types/react-syntax-highlighter": "^15.5.6",
"@types/styled-components": "^5.1.26",
"@vitejs/plugin-react": "^3.1.0",
"vite": "^4.2.1",
"vite-plugin-checker": "^0.5.6",
"vite-plugin-env-compatible": "^1.1.1"
"@types/react-syntax-highlighter": "^15.5.13",
"@types/styled-components": "^5.1.34",
"@vitejs/plugin-react": "^4.3.4",
"vite": "^6.0.6",
"vite-plugin-checker": "^0.8.0",
"vite-plugin-env-compatible": "^2.0.1"
}
}
8 changes: 6 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { ChangeEvent, useState } from 'react'
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import React, { ChangeEvent, useState } from 'react'
import { Prism, SyntaxHighlighterProps } from 'react-syntax-highlighter'
import EdiText, { InputProps } from 'react-editext'
import styled from 'styled-components'
import * as examples from './_examples'

// https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/539
const SyntaxHighlighter =
Prism as typeof React.Component<SyntaxHighlighterProps>

const StyledEdiText = styled(EdiText)`
button {
border-radius: 5px;
Expand Down
13 changes: 8 additions & 5 deletions example/vite.config.ts → example/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import react from '@vitejs/plugin-react'
import path from 'path'
import { fileURLToPath } from 'url'
import { defineConfig } from 'vite'
import checker from 'vite-plugin-checker'
import envCompatible from 'vite-plugin-env-compatible'
import path from 'node:path'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
Expand All @@ -15,10 +18,10 @@ export default defineConfig(({ mode }) => {
}),
checker({
overlay: false,
typescript: true,
eslint: {
lintCommand: 'eslint "./src/**/*.{ts,tsx}"'
}
typescript: true
// eslint: {
// lintCommand: 'eslint "./src/**/*.{ts,tsx}"'
// }
})
],
resolve: {
Expand Down
Loading

0 comments on commit 7392a1a

Please sign in to comment.