You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
In addition to the default terminal output (see examples below), sloc provides an alternative set of output formatters:
CSV
JSON
Command line table
Install
To use sloc as an application install it globally:
sudo npm install -g sloc
If you're going to use it as a Node.js module within your project:
npm install --save sloc
Browser
You can also use sloc within your browser application.
Linksloc.js in your HTML file:
<scriptsrc="lib/sloc.js"></script>
Usage
CLI
sloc [option]<file>|<directory>
Options:
-h, --help output usage information-V, --version output the version number-e, --exclude<regex> regular expression to exclude files and folders-i, --include<regex> regular expression to include files and folders-f, --format<format> format output: json, csv, cli-table --format-option [value] add formatter option-k, --keys<keys> report only numbers of the given keys-d, --details report stats of each analyzed file-a, --alias<custom ext>=<standard ext>alias custom ext to act like standard ext (eg. php5=php,less=css)