https://github.com/shadowmoose/gha-loc-badge
Count project Lines of Code & generate a badge for display.
https://github.com/shadowmoose/gha-loc-badge
Last synced: over 1 year ago
JSON representation
Count project Lines of Code & generate a badge for display.
- Host: GitHub
- URL: https://github.com/shadowmoose/gha-loc-badge
- Owner: shadowmoose
- License: mit
- Created: 2020-04-24T06:55:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T21:44:34.000Z (over 2 years ago)
- Last Synced: 2024-10-26T11:35:17.855Z (over 1 year ago)
- Language: JavaScript
- Size: 1.09 MB
- Stars: 37
- Watchers: 2
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LoC-Badge 
Count project Lines of Code & generate a badge for display.
## To use:
In a Github Action, download your project and run this action:
```yaml
- name: Make Code Badge
uses: shadowmoose/GHA-LoC-Badge@1.0.0
id: badge
with:
debug: true
directory: ./
badge: ./output/badge.svg
patterns: '*.js' # Patterns in the format of a '.gitignore' file, separated by pipes.
ignore: 'node_modules'
```
Once the badge has been generated, use whatever tool you prefer to upload it somewhere.
I personally prefer to push the badges to another branch of the project, where they can be linked easily.
You can [see a full example file that does this here.](./.github/workflows/main.yml)
The output badge can be customized. [Check out the input options here.](./action.yml)