node-loc
ts-lib [![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/ts-lib)
Last updated 2 years ago by ephoton .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-loc 
SYNC missed versions from official npm registry.

npm version Build Status Coverage Status

node-loc

???? Counts the number of lines of code, written in TypeScript.

Prerequisites

  • Node.js 6+

Install

npm install node-loc

or

yarn add node-loc

Usage

You can use node-cloc in you ternimal, or as a npm package in your projects.

Command line mode

Support CLOC of a file or directory.

1. a file

# loc file <path>
loc file src/index.ts

loc file

2. a directory

# loc dir <pattern>
loc dir **/*.ts

loc dir

Third-party mode(in TypeScript)

import { LocFile, LocDir } from 'node-loc';

// for a file.
const file = new LocFile(filePath);
const { info } = file.getInfo();

//  for a directory.
const dir = new LocDir(pattern);
const { info } = dir.getInfo();

Features

  • Support both command line mode and third-party package mode.
  • Written in TypeScript with complete define types.

License

MIT License.

Current Tags

  • 1.1.7                                ...           latest (2 years ago)

9 Versions

  • 1.1.7                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 2
Dependencies (14)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |