🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

grunt-depcheck

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-depcheck

Depcheck Grunt plugin

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
21
-30%
Maintainers
2
Weekly downloads
 
Created
Source

grunt-depcheck

Build Status dependencies Status devDependencies Status

Depcheck Grunt plugin

Getting Started

This plugin is compatible with Grunt >= 0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-depcheck --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-depcheck');

The "depcheck" task

Overview

In your project's Gruntfile, add a section named depcheck to the data object passed into grunt.initConfig().

grunt.initConfig({
  depcheck: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    }
  }
});

Options

options.withoutDev

Type: Boolean Default value: false

By default, depcheck looks at the devDependencies from the package.json file in order to look at unused dependencies. Set this to true and it will look only at the dependencies.

options.ignoreDirs

Type: Array Default value: [.git','.svn','.hg','.idea','node_modules','bower_components']

A list of directories to be ignored.

options.ignoreMatches

Type: Array Default value: []

Ignore dependencies that match these minimatch patterns. For example grunt-*

options.failOnUnusedDeps

Type: Boolean Default value: false

Set this to true to make unused dependencies respond as a failure in Grunt.

options.failOnMissingDeps

Type: Boolean Default value: false

Set this to true to make missing dependencies respond as a failure in Grunt.

options.listMissing

Type: Boolean Default value: false

By default, only the names of packages that are used but not set in the package.json will be included in the Grunt output. Set this to true and the Grunt output will also list all the files where the missing dependency is being used.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Keywords

depcheck

FAQs

Package last updated on 25 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts