Wednesday, March 16, 2016

CLOC -> Count lines of Code , Concat Source code



Output all source to a single file

find . "(" -name "*.js" -or -name "*.css" -or -name "*.ts" -or -name "*.less" ")" -exec cat {} + >> web.output.file



iOS

find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.swift" ")"  -exec cat {} + >> ios.output.file



find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.swift" ")" -print0 | xargs -0 wc -l

Java

find . "(" -name "*.java" -or -name "*.kt" ")"  -exec cat {} + >> android.output.file


web/typescript

find . "(" -name "*.js" -or -name "*.css" -or -name "*.ts" -or -name "*.less" ")" -print0 | xargs -0 wc -l