Skip to content

Commit e99e271

Browse files
committed
refactor!: switch to vue 3
1 parent 679f426 commit e99e271

20 files changed

+951
-916
lines changed

dist/VueMarkdown.js

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

dist/VueMarkdown.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
.cache
2-
dist
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local

example/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Vue 3 + Typescript + Vite
2+
3+
This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4+
5+
## Recommended IDE Setup
6+
7+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8+
9+
## Type Support For `.vue` Imports in TS
10+
11+
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.

example/static/index.html renamed to example/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
56
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7-
<title>Vue</title>
7+
<title>Vite App</title>
88
</head>
9-
109
<body>
1110
<div id="app"></div>
12-
<script src="index.js"></script>
11+
<script type="module" src="/src/main.ts"></script>
1312
</body>
1413
</html>

example/package.json

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
{
2-
"name": "vue-markdown-render-example",
3-
"version": "1.0.0",
4-
"main": "index.js",
5-
"license": "MIT",
2+
"name": "example",
3+
"version": "0.0.0",
64
"scripts": {
7-
"serve": "rollup -cw"
5+
"dev": "vite",
6+
"build": "vue-tsc --noEmit && vite build",
7+
"preview": "vite preview"
88
},
99
"dependencies": {
10-
"vue": "^2.6.14"
10+
"vue": "^3.2.25"
1111
},
1212
"devDependencies": {
13-
"@rollup/plugin-commonjs": "^20.0.0",
14-
"@rollup/plugin-json": "^4.1.0",
15-
"@rollup/plugin-node-resolve": "^13.0.4",
16-
"@rollup/plugin-replace": "^3.0.0",
17-
"@rollup/plugin-typescript": "^8.2.5",
18-
"rollup": "^2.56.3",
19-
"rollup-plugin-css-only": "^3.1.0",
20-
"rollup-plugin-node-builtins": "^2.1.2",
21-
"rollup-plugin-serve": "^1.1.0",
22-
"rollup-plugin-terser": "^7.0.2",
23-
"tslib": "^2.3.1"
13+
"@vitejs/plugin-vue": "^2.0.0",
14+
"typescript": "^4.4.4",
15+
"vite": "^2.7.2",
16+
"vue-tsc": "^0.29.8"
2417
}
25-
}
18+
}

0 commit comments

Comments
 (0)