count-lines.sh 363 B

123456789101112
  1. #!/bin/bash
  2. # 扫描项目中超过 400 行的 .ts 文件(排除 node_modules、dist、rpc、bundled-resources)
  3. find . -name "*.ts" \
  4. -not -path "*/node_modules/*" \
  5. -not -path "*/dist/*" \
  6. -not -path "*/rpc/*" \
  7. -not -path "*/bundled-resources/*" \
  8. -not -path "*/.e2e-home/*" \
  9. -exec wc -l {} + \
  10. | awk '$1 > 400 {print $1, $2}' \
  11. | sort -rn