https://github.com/ladjs/gulp-haschanged-deps-async
Deep dependency recursive modified time comparison to ensure your files only re-compile when needed
https://github.com/ladjs/gulp-haschanged-deps-async
Last synced: 4 months ago
JSON representation
Deep dependency recursive modified time comparison to ensure your files only re-compile when needed
- Host: GitHub
- URL: https://github.com/ladjs/gulp-haschanged-deps-async
- Owner: ladjs
- License: mit
- Created: 2018-03-03T01:14:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T02:52:57.000Z (almost 2 years ago)
- Last Synced: 2025-10-26T08:36:38.261Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 233 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-haschanged-deps-async
[](https://travis-ci.org/niftylettuce/gulp-haschanged-deps-async)
[](https://codecov.io/gh/niftylettuce/gulp-haschanged-deps-async)
[](https://github.com/sindresorhus/xo)
[](https://github.com/prettier/prettier)
[](https://lass.js.org)
[](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`
//
precinct: {
type: 'less'
}
})
)
)
.pipe(sourcemaps.init())
.pipe(less())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('css'))
);
});
```
## Contributors
| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | |
## License
[MIT](LICENSE) © Matt Powell
##
[npm]: https://www.npmjs.com/
[yarn]: https://yarnpkg.com/