npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

markvue

v0.2.4

Published

Allows you write Vue SFC directly in Markdown

Readme

MarkVue

Allows you to mix Vue component or Vue SFC into Markdown, inspired by @vue/sfc-playground.

How to use

1: Install the package:

npm install markvue --save

2: Import it to your project:

import MarkVue from 'markvue';
import { createApp } from 'vue';
import App from './app.vue';

const app = createApp(App);
app.use(MarkVue);

app.mount('#app');

Our component only support Vue 3, Vue 2 is not supported.

3: Use it in your pages:

<template>
  <MarkVue :content="content" />
</template>

<script>
import { defineComponent } from 'vue';

const content = `
# Title

## Subtitle

Here's some content and the following is a vue sfc.

<vue-sfc>
<template>
  <div class="sfc-test">
    <button @click="count++">{{ count }}</button>
  </div>
</template>
<script setup>
import { ref } from 'vue';

const count = ref(0);
</script>
<style scoped>
button {
  padding: 6px 12px;
  background: #41aeff;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
}
</style>
</vue-sfc>

<vue-sfc>
<template>
  <div class="sfc-test">
    <span>second sfc</span>
  </div>
</template>
</vue-sfc>

Here's a vue component stub.

<vue-comp component="stubTest" />
`
export default defineComponent({
  setup() {
    return {
      content,
    };
  },
});
</script>

For Vue SFC, markvue will inject Vue into the SFC as context, you can import APIs from Vue directly.

If you want to import something from other package, be sure to put it in the context, and bind it to markvue, just like this:

<template>
  <MarkVue :content="content" :context="context" />
</template>

<script setup>
import SOMETHING from 'SOME_PACKAGE';

return {
  content: `
  <vue-sfc>
  <template>
    <div>{{ content }}</div>
  </template>
  <script setup>
  import { SOME_METHOD } from 'SOME_PACKAGE';

  return {
    content: SOME_METHOD(),
  };
  </script>
  </vue-sfc>
  `,
  context: {
    SOME_PACKAGE: SOMETHING,
  },
};
</script>

You can also put a Vue component into context directly, you can mix it into your Markdown like this:

# Title

content

<vue-comp component="myComponent" />
<template>
  <MarkVue :context="context">
</template>

<script setup>
import myComponent from './myComponent.vue';

return {
  context: {
    myComponent,
  },
};
</script>

If you want to add class or some other attribute in the root element of Vue SFC or Vue component, you can just add it to the <vue-sfc> or <vue-comp> tag, like this:

<vue-comp class="my-vue-comp" />

or

<vue-sfc class="my-vue-sfc">
</vue-sfc>

For custom options of marked, you can set an attribute markedOptions to markvue, like this:

<template>
  <MarkVue :markedOptions="markedOptions">
</template>

Features

Supported SFC Features:

  • <script setup>

  • Scoped styles

Unsupported SFC Features:

  • TypeScript

  • Style Preprocessors

  • Babel transform (The script which your wrote in the SFC will only be compiled by @vue/compiler-sfc, you need to ensure the compatibility by yourself)

License

MIT