# gulp-stats

> Display task stats summary for Gulp

Latest version **1.0.2** (published 2020-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-stats
pnpm add gulp-stats
yarn add gulp-stats
bun add gulp-stats
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-12-21 |
| First published | 2015-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 31.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Mike Simmonds |
| Maintainers | simmo |
| Keywords | gulp, gulpfriendly, time, task, profile, benchmark, measure, stats |

## Links

- npm: https://www.npmjs.com/package/gulp-stats
- Repository: https://github.com/simmo/gulp-stats
- Homepage: https://github.com/simmo/gulp-stats#readme
- Issues: https://github.com/simmo/gulp-stats/issues
- npm.io page: https://npm.io/package/gulp-stats

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.0
- [text-table](https://npm.io/package/text-table.md) ^0.2.0
- [pretty-hrtime](https://npm.io/package/pretty-hrtime.md) ^1.0.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-12-21
- 1.0.1 — 2020-09-06
- 1.0.0 — 2020-08-15
- 0.0.4 — 2016-11-17
- 0.0.3 — 2015-02-12
- 0.0.2 — 2015-01-28
- 0.0.1 — 2015-01-28

## README

# gulp-stats

![npm](https://img.shields.io/npm/v/gulp-stats?style=flat-square) ![npm](https://img.shields.io/npm/dw/gulp-stats?style=flat-square) ![Travis (.com)](https://img.shields.io/travis/com/simmo/gulp-stats?style=flat-square)

> Display task stats summary for [Gulp](https://gulpjs.com/) 4

![screenshot](screenshot.png)

## Installation

```sh
$ 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.

```js
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:

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

**Example**

```js
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](https://mike.id)

---
_Source: https://npm.io/package/gulp-stats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
