[requirements]
$ curl -sS https://api.github.com/repos/userName/repoName/stats/code_frequency | jq 'reduce .[] as $row (0; . + $row[1] + $row[2])'
tested with this repo
koji / node-typescript-boilerplate
boilerplate for nodejs with typescript
typescript-node-boilerplate
This is a boilerplate for nodejs project with typescript.
The followings are details of this boilerplate.
blog post for this
npm-script
The commands are ordered alphabetically.
yarn clean
This command will clean up dist folder that is for build files(.js files)
"clean": "rimraf dist/*",
yarn dev:watch
This commands allows run index.ts file without compile and monitor the changes on the file
"dev:watch": "ts-node-dev --respwn src/index.ts",
yarn dev
This commands allows run index.ts file without compile
"dev": "ts-node src/index.ts",
yarn format
This commands will format all files with the rules that are based on .eslintrc.js
"format": "prettier --write 'src/**/*.{js,ts,json}'",
yarn lint:all
This command will lint all ts files and run tsc
without generating any .js files
"lint:all": "yarn lint && yarn tscCheck
…$ curl -sS https://api.github.com/repos/koji/node-typescript-boilerplate/stats/code_frequency | jq 'reduce .[] as $row (0; . + $row[1] + $row[2])'
2605
The output is including empty lines and comments in the codebase.
If you use cloc, you can count code without empty lines and comments.
# install cloc
$ brew install cloc
#!/usr/bin/env zsh
git clone --depth 1 "$1" linecount-repo && \
printf "('linecount-repo' will be deleted automatically)\n\n\n" && \
cloc linecount-repo && \
rm -rf linecount-repo
Then you can register the above script as an alias and use it easily.
Other way
$ cd your_github_repo
$ git ls-files | xargs -n1 git --no-pager blame -f -w|grep <userName> |wc -l
Top comments (0)