/patternfly-analytics

Static code analysis about PatternFly consumer repos

Primary LanguageJavaScript

PatternFly analytics

This project pulls current PatternFly usage metrics across a number of products.

Usage

  • Install dependencies:
    • npm install
  • Run a new report:
    • npm run collect
  • View the new report, created within:
    • /stats-static/{CURRENT-DATE}

Overview

This project references a static list of projects, listed within repos.json. A new report is generated by running npm run collect, which triggers the functionality within /src/static-analysis/cli.js.

These repositories are cloned locally into a /tmp directory, and each are looped through functionality within getPackageStats.js, getPatternflyStats.js, and getSortedImports.js to output the following files:

  • _all_dependencies.json
    • Groups all projects by shared dependency
  • _all.json
    • Lists all imported PatternFly assets by import file path or import type
  • _all_sorted.json
    • Groups together common imported assets regardless of file path from _all.json and sorts them by total imported quantity across repos.