pot

project overview tool, used to analyze the amount of code, the number of files, code statistics and so on.

Project overview tool for analyzing code volume, file count, code statistics, etc.

Github.com/fancylife/z…

The installation

Install the z – pot

npm i -g z-pot

cd ${yourProject}

pot report
Copy the code

Features

  • File statistics
  • Custom Templates
  • [] File type distribution
  • [] Lines of code are distributed in intervals
  • [] Analyze the project technology stack
  • [] Analyze project Git participants
Shell Usage: pot <command> [options] project overview tool options: -V, --version output the version number -h, --help output usage information Commands: $pot report ## $pot report -t XXX ##Copy the code

Custom Templates

Template Context Context

This.statinfo = {createdTime: moment(new Date()).format('YYYY-MM-DD'), fileSize: 0, // filesCount: FileLineCount: 0, // File count dirsCount: 0, // Directory count fileLineCount: 0, // File count maxFileLine: 0, // The maximum number of lines in a single file bigFilesList: [] // List of large files}Copy the code

Customize template content report. Template. HTML

<! DOCTYPEhtml>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="Width = device - width, initial - scale = 1.0">
    <title>Document</title>
</head>
<body>
    ${this.statInfo.createdTime}
</body>
</html>
Copy the code
pot report -t ./tests/report.template.html
ls pot_report_2021-04-05.html
Copy the code