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 🙏

© 2025 – Pkg Stats / Ryan Hefner

plato-vue

v1.2.8

Published

A globally installable Vue.js and JavaScript Maintainability Index analyzer using Plato with clean modular architecture

Readme

🚀 Plato Vue.js & JavaScript Maintainability Analyzer

Plato for Vue and JavaScript projects - Clean, modular code analysis

npm version npm downloads License: MIT

Plato Vue.js & JavaScript Maintainability Analyzer

A globally installable Node.js package that analyzes Vue.js .vue files and JavaScript .js files to generate comprehensive maintainability reports using Plato.

🚀 Features

  • Vue.js Support: Analyzes Vue Single File Components (SFC) by extracting <script> blocks
  • JavaScript Support: Directly analyzes JavaScript files for comprehensive coverage
  • Maintainability Index: Calculates and categorizes code maintainability scores
  • Cyclomatic Complexity: Measures code complexity for better understanding
  • HTML Reports: Generates detailed HTML reports with Plato's visualization
  • Global CLI: Install once, use anywhere in your system
  • Modular Architecture: Clean, maintainable code following Single Responsibility Principle

📦 Installation

npm install -g plato-vue

🎯 Usage

Basic Usage

# Analyze current directory (Vue + JS files)
plato-vue

# Analyze specific directory
plato-vue src

# Analyze with custom output directory
plato-vue src custom-report

Examples

# Analyze a Vue.js project
plato-vue "my-vue-project"

# Generate report in specific folder
plato-vue src "reports/maintainability"

# Quick test on current project
plato-vue . test-output

📈 Maintainability Categories

  • 🟢 Excellent (85+): High-quality, easily maintainable code
  • 🟡 Good (65-84): Good quality with room for minor improvements
  • 🟠 Moderate (50-64): Moderate quality, consider refactoring
  • 🔴 Low (<50): Poor quality, significant refactoring needed

📊 Output

Console Output

🔍 Plato Vue.js & JavaScript Maintainability Analyzer
📁 Analyzing: C:\Users\Win Aung\projects\my-vue-project
📊 Output: C:\Users\Win Aung\projects\my-vue-project\plato-report

🔍 Found 15 Vue file(s):
   src\App.vue
   src\components\Header.vue
   ...

🔍 Found 8 JavaScript file(s):
   src\utils\helper.js
   src\services\api.js
   ...

📊 Summary: 23 files processed out of 23 total files (Vue + JS)

📊 Plato Analysis Results:

📁 src\App.vue (Vue):
   Maintainability Index: 85.50
   Cyclomatic Complexity: 2.10
   Lines of Code: 45
   Status: 🟢 Excellent

📁 src\utils\helper.js (JS):
   Maintainability Index: 78.20
   Cyclomatic Complexity: 3.45
   Lines of Code: 67
   Status: 🟡 Good

📈 Summary:
   Average Maintainability Index: 78.25
   Average Cyclomatic Complexity: 1.85
   Total Files Analyzed: 23

🌐 HTML Report generated at: C:\Users\Win Aung\projects\my-vue-project\plato-report\index.html
   Open this file in your browser for detailed analysis!

🧹 Temporary files cleaned up.
✅ Analysis complete!

HTML Report

Generates a comprehensive HTML report with:

  • File-by-file analysis (Vue + JavaScript)
  • Maintainability Index charts
  • Complexity metrics
  • Code quality insights
  • Interactive navigation

🐛 Troubleshooting

Common Issues

"No .vue or .js files found"

  • Ensure the target directory contains .vue or .js files
  • Check file permissions
  • Verify the path is correct

"No script blocks found in Vue files"

  • Vue files must contain <script> tags
  • Check for proper Vue SFC syntax

Analysis errors

  • Some modern JavaScript syntax may not be supported by Plato
  • Check console for specific error messages
  • Verify Node.js version compatibility

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow the existing code structure
  4. Add tests for new functionality
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Built with Plato for code analysis
  • Uses Node.js built-in file system APIs for efficient file discovery
  • Inspired by the need for Vue.js and JavaScript maintainability analysis

📞 Support