tloc
v1.1.6
Published
Find out how many lines of code you have written for your project.
Downloads
8
Readme
📜 TLOC (Tomper Lines Of Code)
Find out how many lines of code you have written for your project.
📈 Installation
(Install the package globally)
npm install -g tloc
🧪 Usage
The tloc
command can be used to calculate the number of lines of code by providing the location of the file or folder. Some additional options and flags that can be used:
-l
or--log
: Adding some additional information to the console.--
: Ignoring files/directories (This option must be used at the last)
Example: Getting number of lines
# path to folder
tloc ./src
# path to file
tloc ./src/index.ts
Example: Logging additional information
tloc ./src -l
# or
tloc ./src --log
Example: Ignoring files/directories
# Remove particular file or directory
tloc ./src -- ./src/dummyData.js ./temp
# Remove all matching occurences
tloc ./src -- dummyData.js temp
# While using other options, use the ignore option at last
tloc ./src -l -- dummyData.js ./temp
✨ Features
- [x] Calculates the number of lines in each file by recursively moving through the directories.
- [x] Ignore specific files/directories or all matching occurrences.
- [x] Implemented using
Depth First Search (DFS)
algorithm.
⚙ Tools and Technologies used
🛠 Local Installation and setup
Clone the repo to your local machine.
Install the required dependency using:
npm install
🏎 Creating production built
Build the package using:
npm run build