Socket
Socket
Sign inDemoInstall

cloc

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloc - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

other/update

7

package.json
{
"name": "cloc",
"version": "2.6.0",
"version": "2.7.0",
"description": "An npm module for distributing cloc by Al Danial https://github.com/AlDanial/cloc",

@@ -24,3 +24,6 @@ "main": "lib/cloc",

},
"homepage": "https://github.com/kentcdodds/cloc#readme"
"homepage": "https://github.com/kentcdodds/cloc#readme",
"scripts": {
"update": "./other/update"
}
}

@@ -5,5 +5,7 @@ # cloc

This is just an npm distribution of the amazing [cloc](https://github.com/AlDanial/cloc) by [Al Danial](pontifespresso).
[I](https://twitter.com/kentcdodds) created this package because I think `cloc` is awesome, but didn't want to download
the file and commit it to my project.
This is just an npm distribution of the amazing
[cloc](https://github.com/AlDanial/cloc) by
[Al Danial](https://twitter.com/pontifespresso).
[I](https://twitter.com/kentcdodds) created this package because I think `cloc`
is awesome, but didn't want to download the file and commit it to my project.

@@ -16,23 +18,36 @@ # Installation and Requirements

`cloc` is written in perl and the binary that this package exposes is the `cloc` perl script. You must have perl installed on your machine for this binary to work.
`cloc` is written in perl and the binary that this package exposes is the `cloc`
perl script. You must have perl installed on your machine for this binary to
work.
### Node & npm
This is distributed as an `npm` package (some say that stands for "Node Package Manager"). So you must have Node.js and npm installed.
Here are quick instructions on how to get those: http://blog.nodeknockout.com/post/65463770933/how-to-install-node-js-and-npm
This is distributed as an `npm` package (some say that stands for "Node Package
Manager"). So you must have Node.js and npm installed.
Congratulations, you've opened your life to a whole new world of awesome tooling and other cool things :-)
Here are quick instructions on how to get those:
http://blog.nodeknockout.com/post/65463770933/how-to-install-node-js-and-npm
Congratulations, you've opened your life to a whole new world of awesome tooling
and other cool things :-)
## Installation
Install this tool via `npm`: `$ npm install -g cloc`
The recommended usage is temporary installation using `npx`:
```
npx cloc [options]
```
However, you can also install it globally or locally to a project.
[Learn more](https://flaviocopes.com/npm-packages-local-global/)
# Usage
In your terminal, simply type `cloc` to get output of the options available.
In your terminal, simply type `npx cloc` to get output of the options available.
See the official [cloc](http://cloc.sourceforge.net/) website for documentation on how to use `cloc`.
See the official [cloc](http://cloc.sourceforge.net/) website for documentation
on how to use `cloc`.
Here's the output when you type `cloc`:
Here's the output when you run `cloc`:

@@ -372,27 +387,18 @@ ```

## Locally in a project
## Development
I use this in my project to keep track of my lines of code as the project grows (mostly for fun). Here's what I do:
To update the `cloc` version, run:
1. Install it as one of your `devDependencies` with `$ npm i -D cloc`
2. Add this to your `package.json`:
```
npm run update -- VERSION
```
```javascript
{
// your other config stuff
"scripts": {
"count": "cloc app/" // <-- other options would go here as well...
},
"devDependencies": {
"cloc": "2.0.0" // <-- this should be added automatically when you install with the `-D` flag
}
// more config stuff
}
For example:
```
npm run update -- 1.88
```
3. Whenever you want to count your lines of code, simply enter: `$ npm run count`
# LICENSE
This package is and the `cloc` cli itself is licensed with GPL 2.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc