<commit_before>gulp-dependencies-changed
=========================
[![Build Status](https://travis-ci.org/mixi-inc/gulp-dependencies-changed.svg?branch=master)](https://travis-ci.org/mixi-inc/gulp-dependencies-changed)
[![npm version](https://badge.fury.io/js/gulp-dependencies-changed.svg)](http://badge.fury.io/js/gulp-dependencies-changed)

Smart incremental building by dependency analysis.


Installation
------------

```shell
npm install --save-dev gulp-dependencies-changed
```


Usage
-----

```javascript
var less = require('gulp-less');
var changed = require('gulp-dependencies-changed');
var Path = require('path');
var rename = require('rename');

gulp.task('less', function() {
  return gulp.src('./less/**/*.less')
    // Analize dependencies for less. Pass through
    // only files that its depending files are changed.
    .pipe(changed({
      matcher: /@import ['"]?([^'"]+)['"]?;/g,
      dest: function(srcRelPath, srcBasePath) {
        // It should return dest file path.
        return rename(srcPath, function(fileObj) {
          return {
            dirname: Path.join('public/css' + fileObj.dirname)
            extname: 'css',
          };
        });
      },
    }))
    .pipe(less())
    .pipe(gulp.dest('./public/css'));
});
```


API
---
### changed(options)

Only pass through dependent files that depending to changed files
<commit_msg>Fix a shameful typo :flushed:<commit_after>gulp-dependencies-changed
=========================
[![Build Status](https://travis-ci.org/mixi-inc/gulp-dependencies-changed.svg?branch=master)](https://travis-ci.org/mixi-inc/gulp-dependencies-changed)
[![npm version](https://badge.fury.io/js/gulp-dependencies-changed.svg)](http://badge.fury.io/js/gulp-dependencies-changed)

Smart incremental building by dependency analysis.


Installation
------------

```shell
npm install --save-dev gulp-dependencies-changed
```


Usage
-----

```javascript
var less = require('gulp-less');
var changed = require('gulp-dependencies-changed');
var Path = require('path');
var rename = require('rename');

gulp.task('less', function() {
  return gulp.src('./less/**/*.less')
    // Analyze dependencies for less. Pass through
    // only files that its depending files are changed.
    .pipe(changed({
      matcher: /@import ['"]?([^'"]+)['"]?;/g,
      dest: function(srcRelPath, srcBasePath) {
        // It should return dest file path.
        return rename(srcPath, function(fileObj) {
          return {
            dirname: Path.join('public/css' + fileObj.dirname)
            extname: 'css',
          };
        });
      },
    }))
    .pipe(less())
    .pipe(gulp.dest('./public/css'));
});
```


API
---
### changed(options)

Only pass through dependent files that depending to changed files

{'fraction_non_alphanumeric': 0.19768283852280955, 'fraction_numerical': 0.0, 'mean_word_length': 3.1927162367223065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7669293', 'n_tokens_mistral': 879, 'n_tokens_neox': 829, 'n_words': 174}