In this short tutorial we are gonna see how to count lines of code that you've written.
Before we get started you should have
npx installed in your machine.
- Open terminal and cd to your project directory.
- Run the following command
npx sloc .
or you can install
sloc package globaly.
npm install -g sloc
run command with
sudo if you using linux or mac.
then you can run
If you want to exclude file or directory( Like
node modules) you can do like that.
sloc . -e <file>|<directory>
- Here I have a django project in which i have
venvfolder that i wanna exclude.
Thanks for reading.
Happy coding 😎.