Socket
Socket
Sign inDemoInstall

grunt-stats

Package Overview
Dependencies
3
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-stats

Display files statistic for separate directories in your project.


Version published
Weekly downloads
2
Maintainers
1
Install size
383 kB
Created
Weekly downloads
 

Readme

Source

grunt-stats Build Status

Display files statistic for separate directories in your project.

Getting Started

This plugin requires 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-stats --save-dev

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

grunt.loadNpmTasks('grunt-stats');

The "stats" task

Overview

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

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

Options

options.mode

Choices: 'verbose', 'short'
Default: 'short'

Either display only short statistic for directory (amount of files and overall size) or display full report in a table format (list of all files, sorted by file size).

Usage Examples

In this example, the default options are used to display short statistic for app/js/ directory. And the custom options are used to display full statistic for app/ and assets/ directories separately.

grunt.initConfig({
    stats: {
        default_options: ['app/js/'],
        custom_options: {
            options: {
                mode: 'verbose'
            },
            src: ['app/', 'assets/']
        }
    },
});

License

MIT © Sergey Lysenko

Keywords

FAQs

Last updated on 04 Apr 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc