Socket
Socket
Sign inDemoInstall

gulp-stats

Package Overview
Dependencies
10
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-stats

Display task stats summary for Gulp


Version published
Maintainers
1
Weekly downloads
532
decreased by-15.96%

Weekly downloads

Readme

Source

gulp-stats

npm npm Travis (.com)

Display task stats summary for Gulp 4

screenshot

Installation

$ npm i --save-dev gulp-stats

Usage

Add to your gulpfile.js before the task(s) you wish to log and pass in the instance of Gulp.

const gulp = require('gulp');
const stats = require('gulp-stats');

stats(gulp);

// ... Tasks ...

Options

reporter: (report: Report) => void

This can be used to provide your own report handler.

A Report is defined as:

{
	tasks: {
		name: string;
		duration: number;
		durationHr: [number, number];
		durationPretty: string;
		isBranch: boolean;
		isRoot: boolean;
	}
	[];
	totalTime: number;
	totalTimeHr: [number, number];
	totalTimePretty: string;
}

Example

const gulp = require('gulp');
const stats = require('gulp-stats');

stats(gulp, reporter: ({ tasks, totalTimePretty }) => {
	console.log(`Total time: ${totalTimePretty}`);
	console.log(`Task count: ${tasks.length}`);
});

MIT © Mike Simmonds

Keywords

FAQs

Last updated on 21 Dec 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