@arylo-scripts/gm-vue

Vue userscript helpers backed by the page-level Vue runtime.
340
Install
npm install @arylo-scripts/gm-vue
Latest Version:1.1.0
Vue:3
License:MIT
Last Updated:Sep 14, 2026
Links: GitHub  ·  npm
Maintainer: arylo

gm-vue

Vue helpers for userscripts that consume a page-level Vue runtime.

Install

npm install @arylo-scripts/gm-vue

Usage

import {
  computed,
  createApp,
  defineComponent,
  h,
  onMounted,
  ref,
} from '@arylo-scripts/gm-vue'

const App = defineComponent({
  setup() {
    const count = ref(0)
    const doubled = computed(() => count.value * 2)

    onMounted(() => {
      count.value += 1
    })

    return () => h('div', `${count.value} / ${doubled.value}`)
  },
})

createApp(App).mount('#app')

Vue is a peer dependency and must exist as the page-level Vue global. This package exposes the page runtime with the same TypeScript types instead of bundling another Vue instance.

API

  • Global APIs: createApp, nextTick, defineComponent, defineAsyncComponent
  • Rendering: h, compile, mergeProps
  • Components: Fragment, KeepAlive, Transition, TransitionGroup, Teleport, Suspense
  • Common Composition API utilities, lifecycle hooks, dependency injection, and Vue types

Development

npm install
npm run lint
npm run build

Related Packages

free-swagger-userscript

free-swagger for tampermonkey

1,939 68
magic-monkey-cli

油猴脚本 Monorepo 多包开发与构建脚手架

802 0
free-swagger-extends

free-swagger for tampermonkey

1,911 68
jabroni-outfit

Small GUI and persistent state lib based on Vue.

9,018 3
all-search

A top fixed menu that allows you to jump between various search engines, build b...

3,753 166

Version History

Version Released Vue License
1.1.0 ^3.5.29 MIT
1.0.0 ^3.5.29 MIT