Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,15 @@ export default defineConfigWithTheme<ThemeConfig>({
}
},

vue: {
// enable vapor interop for @vue/repl
vaporInterop: true,
features: {
// enable vapor mode
vapor: true
}
},

vite: {
define: {
__VUE_OPTIONS_API__: false
Expand Down
12 changes: 5 additions & 7 deletions .vitepress/theme/components/ScrimbaLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
</a>
</div>
</template>
<script>
export default {
props: {
href: { type: String, required: true },
title: { type: String, required: true }
}
}
<script setup>
defineProps({
href: { type: String, required: true },
title: { type: String, required: true }
})
</script>
<style scoped>
.scrimba {
Expand Down
12 changes: 5 additions & 7 deletions .vitepress/theme/components/VueSchoolLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
</a>
</div>
</template>
<script>
export default {
props: {
href: { type: String, required: true },
title: { type: String, required: true }
}
}
<script setup>
defineProps({
href: { type: String, required: true },
title: { type: String, required: true }
})
</script>
<style scoped>
.vueschool {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"type": "vue-tsc --noEmit"
},
"dependencies": {
"@vue/repl": "^4.7.1",
"@vue/repl": "^4.7.2",
"@vue/theme": "^2.4.0",
"dynamics.js": "^1.1.5",
"gsap": "^3.14.2",
"vitepress": "^2.0.0-alpha.17",
"vue": "^3.5.32"
"vitepress": "https://pkg.pr.new/vitepress@7b5a7f8",
"vue": "https://pkg.pr.new/vue@cead722"
},
"devDependencies": {
"@types/body-scroll-lock": "^3.1.2",
Expand Down
519 changes: 372 additions & 147 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions src/examples/ExampleRepl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
onHashChange
} from './utils'

const { vueVersion, defaultVersion, importMap } = useVueImportMap({
runtimeDev: () =>
`https://unpkg.com/vue@${
vueVersion.value || defaultVersion
}/dist/vue.esm-browser.js`
})
const { vueVersion, importMap } = useVueImportMap()
const store = useStore({
vueVersion,
builtinImportMap: importMap
Expand Down
6 changes: 3 additions & 3 deletions src/guide/reusability/custom-directives.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Custom Directives {#custom-directives}

<script setup>
const vHighlight = {
mounted: el => {
const applyHighlight = el => {
el.classList.add('is-highlight')
}
}
// vapor custom directives have a different interface
const vHighlight = __VAPOR__ ? applyHighlight : { mounted: applyHighlight }
</script>

<style>
Expand Down
7 changes: 1 addition & 6 deletions src/tutorial/TutorialRepl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ import {
VTLink
} from '@vue/theme'

const { vueVersion, defaultVersion, importMap } = useVueImportMap({
runtimeDev: () =>
`https://unpkg.com/vue@${
vueVersion.value || defaultVersion
}/dist/vue.esm-browser.js`
})
const { importMap } = useVueImportMap()
const store = useStore({
builtinImportMap: importMap
})
Expand Down