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

@kb-skills/adapter-vue2

v1.0.1

Published

Scan adapter for Vue 2 + Vuex frontends.

Downloads

253

Readme

@kb-skills/adapter-vue2

Scan adapter for Vue 2 + Vuex frontends, powering kb-skills.

Parses your Vue 2 project (Options API .vue SFCs) and emits a ModuleInfo consumed by @kb-skills/core to produce the 5-layer Knowledge Base.

It detects:

| Kind | How it's detected | |---|---| | Views / Pages | src/views/**/*.vue + src/pages/**/*.vue — data, computed, watch, methods, API calls | | Components | src/components/**/*.vue — props (array & object style), emits (this.$emit) | | Mixins | src/mixins/**/*.{js,ts} — exported mixin objects | | Vuex Stores | src/store/**/*.{js,ts} — state, mutations, actions, namespace | | API files | src/api/**/*.{js,ts} — exported fetch wrappers | | Types | src/types/**/*.ts — interfaces + type aliases | | Routes | src/router/index.{js,ts}{ path, component, name } route objects | | UI Library | element-ui / element-plus / vant / antd / antd-mobile / @mui/material |

Install

npm i -D @kb-skills/cli @kb-skills/adapter-vue2

Peer-depends on @kb-skills/core (installed transitively by @kb-skills/cli).

Usage

kb-skills init wires the adapter automatically when it detects vue ^2.x or vue-template-compiler in your package.json. The generated kb-skills.config.ts looks like:

import { defineConfig } from "@kb-skills/cli/config";
import vue2Adapter from "@kb-skills/adapter-vue2";

export default defineConfig({
  kbRoot: "./kb",
  modules: [
    { name: "web", path: "./web", adapter: vue2Adapter() },
  ],
});

Options

import { createVue2Adapter } from "@kb-skills/adapter-vue2";

createVue2Adapter({
  moduleName: "web", // optional, default: "web"
});

UI library detection

The adapter scans every .vue, .ts, and .js file under src/ and collects all PascalCase named imports from the detected UI library package.

| package.json dep | raw.uiLibrary.name | |---|---| | element-ui | "element-ui" | | element-plus | "element-plus" | | vant | "vant" | | antd | "antd" | | antd-mobile | "antd-mobile" | | @mui/material | "material-ui" |

Priority: first match in the table above wins.

Output shape

The adapter returns a ModuleInfo whose raw is a Vue2Raw:

interface Vue2Raw {
  framework: "vue2";
  views:      Vue2PageInfo[];      // src/views/ + src/pages/
  components: Vue2ComponentInfo[]; // src/components/
  mixins:     Vue2MixinInfo[];     // src/mixins/
  stores:     Vue2StoreInfo[];     // src/store/ (Vuex)
  apiFiles:   TsFileInfo[];        // src/api/
  typesFiles: TsFileInfo[];        // src/types/
  routes:     Vue2Route[];         // src/router/index.js|ts
  uiLibrary?: UiLibraryInfo;       // detected UI library
}

Vue2PageInfo (view / page)

interface Vue2PageInfo extends TsFileInfo {
  name:       string;   // file stem, e.g. "UserList"
  dataProps:  string[]; // data() property names
  computeds:  string[]; // computed property names
  watchProps: string[]; // watch property names
  methods:    string[]; // methods block names
  apiCalls:   string[]; // this.$xxx / api.xxx call names
}

Vue2StoreInfo (Vuex module)

interface Vue2StoreInfo extends TsFileInfo {
  namespace?:  string;   // from namespaced: true + directory name
  stateProps:  string[]; // state property names
  mutations:   string[]; // mutation names
  actions:     string[]; // action names
}

See @kb-skills/coretypes.ts for the full type list.

Requirements

  • Node.js >= 18.17
  • A Vue 2 project with vue ^2.x or vue-template-compiler in package.json

License

MIT