Find out how many lines of code you have written for your project 📜

Overview

📜 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:

  1. -l or --log: Adding some additional information to the console.

  2. --: 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

  • Calculates the number of lines in each file by recursively moving through the directories.
  • Ignore specific files/directories or all matching occurrences.
  • Implemented using Depth First Search (DFS) algorithm.

Tools and Technologies used

  1. Typescript
  2. Minimist
  3. Chalk

🛠 Local Installation and setup

  1. Clone the repo to your local machine.

  2. Install the required dependency using:

    npm install

🏎 Creating production built

  1. Build the package using:

    npm run build

😎 Made with 💙 by

GSSoC'22
Varun Kumar Tiwari
LinkedIn Github

License

GPL-3.0




(If you liked the project, give it star 😃 )

You might also like...

🚀 A mongoose plugin to monetize your apis in few lines of code

🚀 A mongoose plugin to monetize your apis in few lines of code

Stripe Mongoose Api Stripe Mongoose Api is a Mongoose plugin that simplifies building checkout and payment system for apis with stripe. It will provid

Dec 29, 2022

Perfect SvelteKit dark mode in 2 lines of code. Support System preference and any other theme with no flashing

This library is a port of next-theme for SvelteKit. All credit goes to pacocoursey and all next-themes contributors While usable, this library is stil

Sep 30, 2022

A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs

A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs with no dependencies. It also has a collection of useful middlewares: log file, serve static, CORS, session, rate limit, token, body parsers, redirect, proxy and handle upload. In "README" there are examples of all the resources. Faster's ideology is: all you need is an optimized middleware manager, all other functionality is middleware.

Dec 28, 2022

Get the latest Flashbots blocks and Flashbots transactions using TypeScript in two lines of code !

mev-blocks-js This package can let you query the Flashbots blocks API easily from any JavaScript or TypeScript project. You can access the Flashbots b

May 14, 2022

Capable Langchain/AutoGPT alternative in ~350 lines of core code

🕵️ 🔗 BingChain This is an evolution of langchain-mini, a very simple re-implementation of LangChain, in ~350 lines of core code. In essence, it is a

Jul 30, 2023

🦜️🔗 This is a very simple re-implementation of LangChain, in ~100 lines of code

🦜️ 🔗 LangChain-mini This is a very simple re-implementation of LangChain, in ~100 lines of code. In essence, it is an LLM (GPT-3.5) powered chat app

Aug 14, 2023

End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register route handlers. LOL

Chino intelligence in japaneese End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register rou

Sep 12, 2022

CryptoList allows users to find out the latest information about top cryptocurrencies

CryptoList allows users to find out the latest information about top cryptocurrencies. The app allows users to find the most popular currencies, sort them out by market cap, gainers, and losers.

Aug 19, 2022

Explore Alveus Sanctuary with an interactive map and find out more about the different buildings on the property.

Alveus Sanctuary Interactive Map Explore Alveus Sanctuary with an interactive map and find out more about the different buildings on the property. htt

Aug 16, 2022
Owner
Varun Tiwari
MERN 💙
Varun Tiwari
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
In this project, you will restructure your Awesome books app code. The goal is to make it more organized by using modules. You will also practice the ES6 syntax that you have learned.

Awesome books: with ES6 In this project, you will restructure your Awesome books app code. The goal is to make it more organized by using modules. You

Kelvin Benjamin 5 Oct 10, 2022
A fast and powerful http toolkit that take a list of domains to find active domains and other information such as status-code, title, response-time , server, content-type and many other

HTTPFY curently in beta so you may see problems. Please open a Issue on GitHub and report them! A Incredible fast and Powerful HTTP toolkit Report Bug

DevXprite 44 Dec 22, 2022
Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.

vite-plugin-i18next-loader yarn add -D vite-plugin-i18next-loader Vite plugin to client bundle i18next locales composited from one to many json/yaml f

AlienFast 4 Nov 30, 2022
Have you always wanted to check if someone has checked out your story or not?

InstaStoryChecker - Search in your story viewers Have you always wanted to check if a certain person has checked out your story or not and you had to

Mohammad Saleh 4 Jul 7, 2022
A Chess learning tool where you have to find a top-engine move in a random position.

Just A Chess Move A Chess learning tool where you have to find a top-5 move in a random position. There aren't necessarily any tactics, you have to ju

Daan Heskes 14 Sep 18, 2022
It's an AI Tag (Prompt) generator for magic drawer! We have many tags and support to generate prompts easily!

魔导绪论 AI 魔咒生成器, 使用由 B 站 UP 主 十二今天也很可爱 提供的 4 万个 tag 并提供中文检索,并提供了魔咒社区方便魔法师们直接复制生成。永远免费,永无广告,无商业。 v2 版本更新内容 使用 Netlify 的云函数提供更为快速的社区数据操作!(暂时不知道花费多少) 查看自己的

江夏尧 28 Jan 1, 2023