https://github.com/myterminal/gulp-that
A generic gulp plugin to do anything with a stream of files
https://github.com/myterminal/gulp-that
gulp
Last synced: 2 months ago
JSON representation
A generic gulp plugin to do anything with a stream of files
- Host: GitHub
- URL: https://github.com/myterminal/gulp-that
- Owner: myTerminal
- License: mit
- Created: 2017-06-25T03:33:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-08-19T05:05:38.000Z (almost 4 years ago)
- Last Synced: 2025-02-17T23:36:58.676Z (over 1 year ago)
- Topics: gulp
- Language: JavaScript
- Size: 98.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-that
[](https://badge.fury.io/js/gulp-that)
[](https://www.npmjs.com/package/gulp-that)
[](https://opensource.org/licenses/MIT)
[](https://travis-ci.org/myTerminal/gulp-that)
[](https://codeclimate.com/github/myTerminal/gulp-that)
[](https://www.npmjs.com/package/eslint-config/myterminal)
[](https://coveralls.io/r/myTerminal/gulp-that?branch=master)
[](https://nodei.co/npm/gulp-that/)
A generic gulp plugin to do anything with a stream of files
## Installation
*gulp-that* is available on *Npm*. You can add it to your Node.js project with a simple command.
npm install gulp-that
## How to Use
'Require' *gulp-that* into a variable and use it as you would use any other gulp plugin. The only special thing about *gulp-that* is that is needs you to tell it for what to do with the files in a stream.
const gulpThat = require('gulp-that');
gulp.task('convert-to-lengths', () => {
gulp.src('src/**/*.js')
.pipe(gulpThat(operation))
.pipe(gulp.dest('dist'));
});
The symbol `operation` can be a function that is capable of transforming a string into another. For example, if it is a function like below,
const operation = inputString =>
inputString.length;
*gulp-that* would transform all files into their own file sizes in bytes.