# gulp-haschanged-deps-async

> Provides a hasChanged function for use with gulp-changed to check mtimes of a file's dependencies

Latest version **0.0.4** (published 2018-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-haschanged-deps-async
pnpm add gulp-haschanged-deps-async
yarn add gulp-haschanged-deps-async
bun add gulp-haschanged-deps-async
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2018-03-07 |
| First published | 2018-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.3 |
| Dependencies | 5 |
| Unpacked size | 178.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matt Powell |
| Maintainers | niftylettuce |
| Keywords | gulp, haschanged, changed, dependencies, rev, revisions, mtime, modified, time, stamp, date, compare, comparison, plugin, build, grunt, less, sass, js, common, require, import, es6, es7, export, imports, exported, module, modules, package, packages |

## Links

- npm: https://www.npmjs.com/package/gulp-haschanged-deps-async
- Repository: https://github.com/niftylettuce/gulp-haschanged-deps-async
- Issues: https://github.com/niftylettuce/gulp-haschanged-deps-async/issues
- npm.io page: https://npm.io/package/gulp-haschanged-deps-async

## Dependencies (5)

- [resolve](https://npm.io/package/resolve.md) ^1.5.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [precinct](https://npm.io/package/precinct.md) ^4.0.0
- [replace-ext](https://npm.io/package/replace-ext.md) ^1.0.0
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.4 (latest) — 2018-03-07
- 0.0.3 — 2018-03-07
- 0.0.2 — 2018-03-06
- 0.0.1 — 2018-03-03

## README

# gulp-haschanged-deps-async

[![build status](https://img.shields.io/travis/niftylettuce/gulp-haschanged-deps-async.svg)](https://travis-ci.org/niftylettuce/gulp-haschanged-deps-async)
[![code coverage](https://img.shields.io/codecov/c/github/niftylettuce/gulp-haschanged-deps-async.svg)](https://codecov.io/gh/niftylettuce/gulp-haschanged-deps-async)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
[![license](https://img.shields.io/github/license/niftylettuce/gulp-haschanged-deps-async.svg)](LICENSE)

> Provides a hasChanged function for use with gulp-changed to check mtimes of a file's dependencies.

This package is a modern and updated fork of [gulp-haschanged-deps](https://github.com/mattpowell/gulp-haschanged-deps) and as such I've retained the original author's licensing as it was inspired by his work.


## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Contributors](#contributors)
* [License](#license)


## Install

[npm][]:

```sh
npm install gulp-haschanged-deps-async
```

[yarn][]:

```sh
yarn add gulp-haschanged-deps-async
```


## Usage

```js
const gulp = require('gulp');
const filter = require('gulp-custom-filter');
const hasChangedDepsAsync = require('gulp-haschanged-deps-async');
const less = require('gulp-less');

gulp.task('less', () => {
  return (
    gulp
      .src(['less/**/*.less'])
      .pipe(
        filter(
          hasChangedDepsAsync('css', {
            // the cwd option is for resolving paths to packages
            // and it defaults to the directory process is running from
            cwd: process.cwd(),
            // an optional extension you can pass if the file extension changes
            extension: '.css',
            // this is optional option, but useful for specifying directly
            // so that no auto-detection is required by `precinct`
            // <https://github.com/dependents/node-precinct>
            precinct: {
              type: 'less'
            }
          })
        )
      )
      .pipe(sourcemaps.init())
      .pipe(less())
      .pipe(sourcemaps.write('.'))
      .pipe(gulp.dest('css'))
  );
});
```


## Contributors

| Name           | Website                    |
| -------------- | -------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |


## License

[MIT](LICENSE) © Matt Powell


## 

[npm]: https://www.npmjs.com/

[yarn]: https://yarnpkg.com/

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