Registry / devops / ui-migration-stats

ui-migration-stats

JSON →
library2.0.0jsnpmunverified

A CLI tool by Cloudflare for quantifying UI framework migrations (e.g., Backbone to React). Version 2.0.0 analyzes source and test files by framework, counts lines of code (LOC), tracks dependencies via webpack stats, and outputs structured JSON for reporting. Stable, low maintenance, with config file support. Differentiator: provides dependency feedback and migration stats specific to framework comparisons.

npm install ui-migration-stats
INSTALL
IMPORT
SIG · UI-MIGRATION-STATS
U
ui-migration-stats
devopsjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stats
const stats = require('ui-migration-stats')
const { stats } = require('ui-migration-stats')
Module exports a function directly, not named.

Shows installation, config file structure, and CLI usage for migration stats.

// Install: npm install ui-migration-stats // Create a stats.conf.json in your project root: // { // "framework1": { // "name": "Backbone", // "src": { // "filetypes": [".js", ".handlebars"], // "path": "./src/backbone" // } // }, // "framework2": { // "name": "React", // "src": { // "filetypes": [".js", ".jsx"], // "path": "./src/react" // } // }, // "options": { // "outputFilename": "./migration-stats.json" // } // } // Then run: npx stats
Debug
Known issues
gotchaConfig file must be valid JSON; JavaScript config with module.exports is not supported.
fix
Use a JSON config file (e.g., stats.conf.json).
affects: >=2.0.0
gotchaThe CLI binary name is 'stats', which may conflict with other tools (e.g., GNU stats).
fix
Use 'npx stats' or a custom script in package.json.
affects: *
deprecatedThe 'unconditionalLoc' option is deprecated and may be removed in future versions.
fix
Remove 'unconditionalLoc' from config; it is now default behavior.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module './stats.conf.json'
Config file not present in current working directory.
fix
Create stats.conf.json or specify a different path with --config.
stats: command not found
CLI not installed globally or not in PATH.
fix
Run 'npx stats' or install globally with 'npm install -g ui-migration-stats'.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
Agent activity
8 hits · last 30 days
node
8
Resources