Skip to content

Commit 8da1a8a

Browse files
committed
Update demo code. (Replaced @codemirror/html to @codemirror/vue.)
Update dependencies.
1 parent f3b69e5 commit 8da1a8a

File tree

7 files changed

+1141
-967
lines changed

7 files changed

+1141
-967
lines changed

.yarn/releases/yarn-3.3.1.cjs

Lines changed: 0 additions & 823 deletions
This file was deleted.

.yarn/releases/yarn-3.4.1.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
yarnPath: .yarn/releases/yarn-3.3.1.cjs
21
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.4.1.cjs

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"node": ">=18.13.0",
5757
"yarn": ">=1.22.10"
5858
},
59-
"packageManager": "yarn@3.3.1",
59+
"packageManager": "yarn@3.4.1",
6060
"sideEffects": false,
6161
"scripts": {
6262
"dev": "vite",
@@ -88,44 +88,45 @@
8888
}
8989
},
9090
"devDependencies": {
91-
"@codemirror/lang-javascript": "^6.1.3",
91+
"@codemirror/lang-javascript": "^6.1.4",
9292
"@codemirror/lang-json": "^6.0.1",
9393
"@codemirror/lang-markdown": "^6.0.5",
94+
"@codemirror/lang-vue": "^0.1.1",
9495
"@types/lodash": "^4.14.191",
95-
"@types/node": "^18.11.18",
96-
"@typescript-eslint/eslint-plugin": "^5.50.0",
97-
"@typescript-eslint/parser": "^5.50.0",
96+
"@types/node": "^18.13.0",
97+
"@typescript-eslint/eslint-plugin": "^5.52.0",
98+
"@typescript-eslint/parser": "^5.52.0",
9899
"@vitejs/plugin-vue": "^4.0.0",
99100
"@vue/eslint-config-prettier": "^7.0.0",
100101
"@vue/tsconfig": "^0.1.3",
101102
"@vueuse/core": "^9.12.0",
102-
"eslint": "^8.33.0",
103+
"eslint": "^8.34.0",
103104
"eslint-config-google": "^0.14.0",
104105
"eslint-config-prettier": "^8.6.0",
105106
"eslint-import-resolver-alias": "^1.1.2",
106107
"eslint-import-resolver-typescript": "^3.5.3",
107-
"eslint-linter-browserify": "^8.33.0",
108+
"eslint-linter-browserify": "^8.34.0",
108109
"eslint-plugin-html": "^7.1.0",
109110
"eslint-plugin-import": "^2.27.5",
110-
"eslint-plugin-jsdoc": "^39.8.0",
111+
"eslint-plugin-jsdoc": "^40.0.0",
111112
"eslint-plugin-prettier": "^4.2.1",
112113
"eslint-plugin-tsdoc": "^0.2.17",
113114
"eslint-plugin-vue": "^9.9.0",
114115
"eslint-plugin-vuejs-accessibility": "^2.1.0",
115116
"eslint-plugin-yaml": "^0.5.0",
116117
"husky": "^8.0.3",
117-
"lint-staged": "^13.1.0",
118+
"lint-staged": "^13.1.2",
118119
"npm-run-all": "^4.1.5",
119-
"prettier": "^2.8.3",
120+
"prettier": "^2.8.4",
120121
"rimraf": "^4.1.2",
121122
"rollup-plugin-visualizer": "^5.9.0",
122-
"sass": "^1.58.0",
123+
"sass": "^1.58.1",
123124
"sass-loader": "^13.2.0",
124125
"typescript": "^4.9.5",
125126
"vite": "^4.1.1",
126127
"vite-plugin-banner": "^0.7.0",
127128
"vite-plugin-checker": "^0.5.5",
128-
"vue": "3.2.45",
129+
"vue": "3.2.47",
129130
"vue-eslint-parser": "^9.1.0",
130131
"vue-markdown-wasm": "^0.3.2",
131132
"vue-tsc": "^1.0.24"

src-docs/DemoPage.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<script setup>
33
import CodeMirror from 'vue-codemirror6';
44
import { useDark } from '@vueuse/core';
5-
import { html } from '@codemirror/lang-html';
5+
import { vue } from '@codemirror/lang-vue';
66
77
import MarkdownDemo from './components/MarkdownDemo.vue';
88
import MarkdownDemoSrc from './components/MarkdownDemo.vue?raw';
@@ -48,7 +48,7 @@ const linterAndCrossBindingDemoSrc = LinterAndCrossBindingDemoSrc.trim();
4848
<code-mirror
4949
v-model="markdownDemoSrc"
5050
:dark="dark"
51-
:lang="html()"
51+
:lang="vue()"
5252
basic
5353
wrap
5454
readonly
@@ -89,7 +89,7 @@ const linterAndCrossBindingDemoSrc = LinterAndCrossBindingDemoSrc.trim();
8989
<code-mirror
9090
v-model="slotDemoSrc"
9191
:dark="dark"
92-
:lang="html()"
92+
:lang="vue()"
9393
basic
9494
wrap
9595
readonly
@@ -118,7 +118,7 @@ const linterAndCrossBindingDemoSrc = LinterAndCrossBindingDemoSrc.trim();
118118
<code-mirror
119119
v-model="linterAndCrossBindingDemoSrc"
120120
:dark="dark"
121-
:lang="html()"
121+
:lang="vue()"
122122
basic
123123
wrap
124124
readonly
@@ -182,7 +182,7 @@ const linterAndCrossBindingDemoSrc = LinterAndCrossBindingDemoSrc.trim();
182182
<code-mirror
183183
v-model="readonlyAndDisabledDemoSrc"
184184
:dark="dark"
185-
:lang="html()"
185+
:lang="vue()"
186186
basic
187187
wrap
188188
readonly

vite.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export default defineConfig(async ({ mode, command }): Promise<UserConfig> => {
129129
? undefined
130130
: {
131131
vue: ['vue'],
132+
eslint: ['eslint-linter-browserify'],
132133
codemirror: [
133134
'codemirror',
134135
'@codemirror/autocomplete',
@@ -138,9 +139,13 @@ export default defineConfig(async ({ mode, command }): Promise<UserConfig> => {
138139
'@codemirror/search',
139140
'@codemirror/state',
140141
'@codemirror/view',
141-
// Add the following as needed.
142+
],
143+
// Add the following as needed.
144+
'codemirror-lang': [
142145
'@codemirror/lang-markdown',
143-
'@codemirror/lang-html',
146+
'@codemirror/lang-javascript',
147+
'@codemirror/lang-json',
148+
'@codemirror/lang-vue',
144149
],
145150
},
146151
},

0 commit comments

Comments
 (0)