gulp-unused
Opinionated gulp plugin that takes an array of method names and creates a report with many times each is used. Don't expect miracles, this is very naive.
Install
Install with npm:
$ npm install --save gulp-unused
Usage
Heads up! The matching is naive, but it works well for quick checks.
var gulp = ;var unused = ; gulp;
Options
.keys
Array of method names to check for.
Example
var keys = Object; gulp ;
.utils
As a more comprehensive alternative to options.keys
, you may pass glob patterns or file paths of the files with "utils" to search for.
Example
gulp ;
Example usage
Given the following project files:
// --lib/utils.js--exports{};exports{};exports{}; // --index.js--var utils = ;module { // do some "foo" and "bar" stuff, but not "baz" utils; utils; utils;};
With the following gulpfile.js
:
var gulp = ;var unused = ; gulp;
Unless options.silent
is true, the following would be logged out:
Method | Times used------ | ----------bar | 2foo | 1baz | 0------ | ---unused | baz
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.30, on August 21, 2016.