Nixinova / LinguistJS

Analyse and list all languages used in a folder. Implementation of and powered by GitHub's Linguist.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add per-file CLI output option

Nixinova opened this issue · comments

The current CLI output lists the overall language statistics:

 Language analysis results:
   1. █ TypeScript               74.89%     28,546 B
   2. █ JavaScript               13.45%      5,125 B
   3. █ JSON                     10.95%      4,174 B
   4. █ INI                       0.71%        272 B

I think it may also be useful to also have a way to list the classification for each file, maybe using -f option:

.editorconfig               █ INI
bin/index.js                █ JavaScript
build/download-files.ts     █ TypeScript
package.json                █ JSON
src/cli.ts                  █ TypeScript
src/helpers/convert-pcre.ts █ TypeScript
src/helpers/load-data.ts    █ TypeScript
src/helpers/read-file.ts    █ TypeScript
src/helpers/walk-tree.ts    █ TypeScript
src/index.ts                █ TypeScript
src/schema.ts               █ TypeScript
src/types.ts                █ TypeScript
test/expected.json          █ JSON
test/folder.js              █ JavaScript
test/perf.js                █ JavaScript
test/unit.js                █ JavaScript
tsconfig.json               █ JSON

Or maybe e.g.

 Language analysis results:
   1. █ TypeScript               74.89%     28,546 B
   		build/download-files.ts
		src/helpers/read-file.ts
   3. █ JavaScript               13.45%      5,125 B
		bin/index.js
``` etc