- Notifications
You must be signed in to change notification settings - Fork5
Count lines of code in a GitHub repository
License
pajecawav/ghloc-web
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Awebsite to display GitHub repository info:
- Total repo size
- Repo health calculated by GitHub (
README.md
, license, etc) - Repo commit activity for the past year
- Bundle size of an
npm
package - Total lines of code by file extension (provided byghloc)
You can use auser script to add a direct link to repo's ghloc page. Can be installed withTampermonkey.
AlsoFirefox addon is available. It provides LOCs stats dropdown directly on project's GitHub page and a direct link to repo's ghloc page. Source code availablehere.
You can useshields.io to embed badges into your README. Navigate to theendpoint badge docs and enter the following to theurl
field:
https://ghloc.vercel.app/api/OWNER/REPO/badge
Then you can preview your badge by clicking "Execute" and copy the full badge URL generated by shields.io which will look something like this:
https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/OWNER/REPO/badge
You can also optionally add an optionalfilter
search param. For example the badge at the top ofthis README has the following URL and only counts files with.ts
or.tsx
extension:
https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/pajecawav/ghloc-web/badge?filter=.ts$,.tsx$
To humanize LOC count you can addformat=human
to search params. So to a produce badge likeyou can use following URL:
https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/pajecawav/ghloc-web/badge?format=human
You can start a dev server by running following commands:
git clone https://github.com/pajecawav/ghloc-web.gitcd ghloc-webpnpm installpnpm dev
Then navigate tohttp://localhost:3000
About
Count lines of code in a GitHub repository