![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@pdanpdan/vue-repl
Advanced tools
Vue SFC REPL as a Vue 3 component.
Note: 2.0 now supports Monaco Editor, but also requires explicitly passing in the editor to be used for tree-shaking.
Basic editing experience with no intellisense. Lighter weight, fewer network requests, better for embedding use cases.
<script setup>
import { Repl } from '@pdanpdan/vue-repl'
import CodeMirror from '@pdanpdan/vue-repl/codemirror-editor'
// import '@pdanpdan/vue-repl/style.css'
// ^ no longer needed after 3.0
</script>
<template>
<Repl :editor="CodeMirror" />
</template>
With Volar support, autocomplete, type inference, and semantic highlighting. Heavier bundle, loads dts files from CDN, better for standalone use cases.
<script setup>
import { Repl } from '@pdanpdan/vue-repl'
import Monaco from '@pdanpdan/vue-repl/monaco-editor'
// import '@pdanpdan/vue-repl/style.css'
// ^ no longer needed after 3.0
</script>
<template>
<Repl :editor="Monaco" />
</template>
Customize the behavior of the REPL by manually initializing the store.
<script setup>
import { watchEffect } from 'vue'
import { Repl, ReplStore } from '@pdanpdan/vue-repl'
import Monaco from '@pdanpdan/vue-repl/monaco-editor'
// retrieve some configuration options from the URL
const query = new URLSearchParams(location.search)
const store = new ReplStore({
// initialize repl with previously serialized state
serializedState: location.hash.slice(1),
// starts on the output pane (mobile only) if the URL has a showOutput query
showOutput: query.has('showOutput'),
// starts on a different tab on the output pane if the URL has a outputMode query
// and default to the "preview" tab
outputMode: query.get('outputMode') || 'preview',
// specify the default URL to import Vue runtime from in the sandbox
// default is the CDN link from jsdelivr.com with version matching Vue's version
// from peerDependency
defaultVueRuntimeURL: 'cdn link to vue.runtime.esm-browser.js',
})
// persist state to URL hash
watchEffect(() => history.replaceState({}, '', store.serialize()))
// pre-set import map
store.setImportMap({
imports: {
myLib: 'cdn link to esm build of myLib',
},
})
// use a specific version of Vue
store.setVueVersion('3.2.8')
</script>
<template>
<Repl :store="store" :editor="Monaco" :showCompileOutput="true" />
</template>
FAQs
Vue component for editing Vue components
We found that @pdanpdan/vue-repl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.