Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plantain-00/code-count
A CLI tool to count code lines and characters.
https://github.com/plantain-00/code-count
Last synced: 12 days ago
JSON representation
A CLI tool to count code lines and characters.
- Host: GitHub
- URL: https://github.com/plantain-00/code-count
- Owner: plantain-00
- License: mit
- Created: 2017-03-24T11:25:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T23:21:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T22:25:32.520Z (about 1 month ago)
- Language: TypeScript
- Size: 1.04 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# code-count
[![Dependency Status](https://david-dm.org/plantain-00/code-count.svg)](https://david-dm.org/plantain-00/code-count)
[![devDependency Status](https://david-dm.org/plantain-00/code-count/dev-status.svg)](https://david-dm.org/plantain-00/code-count#info=devDependencies)
[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/github/plantain-00/code-count?branch=master&svg=true)](https://ci.appveyor.com/project/plantain-00/code-count/branch/master)
![Github CI](https://github.com/plantain-00/code-count/workflows/Github%20CI/badge.svg)
[![npm version](https://badge.fury.io/js/code-count.svg)](https://badge.fury.io/js/code-count)
[![Downloads](https://img.shields.io/npm/dm/code-count.svg)](https://www.npmjs.com/package/code-count)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Fcode-count%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/code-count)A CLI tool to count code lines and characters.
## install
`yarn global add code-count`
## usage
`code-count . -i .ts -e node_modules,.git`
or `code-count src/index.ts`
## options
key | description
--- | ---
-i,--include | file extension name, eg: ".ts,.html", repeatable
-e,--exclude | directories, eg: "node_modules,.git", repeatable
--debug | debug mode
-h,--help | Print this message.
-v,--version | Print the version## api
```ts
import { count } from 'code-count'count('.', {
includedFileExtensionNames: [ '.ts' ],
excludedDirectories: [ 'node_modules', '.git' ]
})
```