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
.
→ Runcloc
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.