gulp-that

0.10.4 • Public • Published

gulp-that

npm version npm downloads License
Build Status Code Climate js-myterminal-style Coverage Status
NPM

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.

Readme

Keywords

Package Sidebar

Install

npm i gulp-that

Weekly Downloads

1

Version

0.10.4

License

MIT

Unpacked Size

4.33 kB

Total Files

4

Last publish

Collaborators

  • myterminal