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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vurif

v0.2.1

Published

Vue component dependency analyzer for Vue.js 2

Downloads

5

Readme

Vurif

npm version npm downloads

Component dependency Analyzer for Vue.js 2.

"Vue verifier" : CLI tool to visualize dependencies by graph.

💡 Epic Features:

  • Analyze dependency from a page(pages) through directory
  • Visualize dependency by graph

[!CAUTION] Works only Vue.js 2 (Not guarantee to work on Vue 3)

📒 Key Concepts:

  • Vue/Nuxt projects often have view files in views, pages and components in components.
  • Vurif loads starting from view files and resolves dependencies in components recursively.

[!NOTE] Vurif assumes that component names in vue files match components file name. In the future, maybe able to parse much dynamic.

This project is under development. Please pay attention to use this tool.

Usage

Install

# npm
npm i -g vurif

# yarn
yarn add -g vurif

Analysis and Visualization

Analyze dependencies of one view file:

vurif load <vue-file> <components-dir>
# vurif load example/pages/index.vue example/components

Analyze dependencies of source root file:

vurif load-all <source-dir> <components-dir>
# vurif load-all example/pages/ example/components

See also vurif --help

Options

--format / -f

graph (default)

Visualize dependencies graph, served on a local server.

graph

stdout

Print graph to stdout by tree format.


  example/pages/home/index.vue
    └── example/components/About.vue
      └── example/components/atoms/Message.vue
  example/pages/index.vue
    └── example/components/App.vue
      └── example/components/atoms/Message.vue
      └── example/components/atoms/Button.vue
      └── example/components/atoms/LinkButton.vue
      └── example/components/CardList.vue
        └── example/components/Card.vue

report

Report degrees of graph elements and summary.

Node degrees:

  ----------------------------------------------------------------------
  | # | name                                    | indegree | outdegree |
  ----------------------------------------------------------------------
  |1  |example/components/atoms/Message.vue     |         2|          0|
  |2  |example/components/About.vue             |         1|          1|
  |3  |example/components/App.vue               |         1|          4|
  |4  |example/components/atoms/Button.vue      |         1|          0|
  |5  |example/components/atoms/LinkButton.vue  |         1|          0|
  |6  |example/components/CardList.vue          |         1|          1|
  |7  |example/components/Card.vue              |         1|          0|
  |8  |example/pages/home/index.vue             |         0|          1|
  |9  |example/pages/index.vue                  |         0|          1|
  ----------------------------------------------------------------------

------------------------------------------------------------------------
Summary:

  🔸 Total nodes: 9
  ➣  Total edges: 8

Development

Requirements: Node.js >=18

  • Enable corepack: corepack enable
  • Install dependencies: pnpm install
  • Execute locally: pnpm dev load example/App.vue example/