# gulp-empathy

> Declarative path mapping in gulp.

Latest version **0.2.0** (published 2015-07-15) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2015-07-15 |
| First published | 2015-07-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Justin Krueger |
| Maintainers | kroogs |

## Links

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

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^3.9.3
- [gulp-concat](https://npm.io/package/gulp-concat.md) ^2.6.0

## Recent versions

- 0.2.0 (latest) — 2015-07-15
- 0.1.1 — 2015-07-03
- 0.1.0 — 2015-07-03

## README

# gulp-empathy

Declarative path mapping and concatenation for gulp.

## Installation

```shell
npm install gulp-empathy
```

## Example

```coffee
empathy = require 'gulp-empathy'

{task} = empathy require('gulp'),
  source: 'src'
  target: 'build'
  ignore: ['**/_*', '**/_*/**']
  map:
    markup: '**/*.{html,jade}'
    styles:
      'styles/app.css': '**/*.{css,styl}'
      'styles/vendor.css': [
        './vendor/normalize.css'
        './vendor/grid.css'
      ]

task 'markup', ->
  @stream.pipe $.if '*.jade', jade()

task 'styles', ->
  @stream
    .pipe $.if '*.styl', stylus()
    .pipe csso()
```

A working example can be seen [here](https://github.com/kroogs/arc).

## Notes

Instead of using gulp.src or gulp.dest, use only @stream.  All other gulp rules apply (such as a function callback or returning a stream).

You can assign a function to @after inside of a task (do this before you use @stream, since it needs to be returned) and it will be called after gulp.dest (useful for streaming changes)  Return the result of stream.pipe from @after's callback.

Any path that begins with '.' (for instance './' or '../') **will not** have source or target paths prefixed.
This is useful for sourcing files from, for example, './node_modules/' or './bower_components/'.

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