Created
March 27, 2025 10:33
-
-
Save martinbuberl/1a10cfc69c7ca883a3deccfc1d9d8315 to your computer and use it in GitHub Desktop.
Revisions
-
martinbuberl created this gist
Mar 27, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ # cloc Cheatsheet ## Next.js [cloc](https://github.com/AlDanial/cloc) command to count the lines of code in a typical Next.js project while ignoring node_modules, .next, and other generated or irrelevant files would be: ``` cloc . --exclude-dir=.git,.next,.vercel,.turbo,.vscode,build,dist,out,node_modules --include-ext=js,jsx,ts,tsx,css,scss,html,json,md ``` ### Breakdown: - `.` → Run `cloc` in the current directory. - `--exclude-dir=.git,.next,.vercel,.turbo,.vscode,build,dist,out,node_modules` → Exclude commonly ignored/generated folders. - `--include-ext=js,jsx,ts,tsx,css,scss,html,json,md` → Only count relevant source files.