gulp-using

0.1.1 • Public • Published

gulp-using

Gulp filter. Lists all files used. Helps you to verify what your patterns catch

Install

npm install --save-dev gulp-using

Example

After some complex src patterns, and some added filter plugins, it helps you to list all files catched

const using = require('gulp-using')
 
var jsfiles = ['./src/js/**/*.js', '!./src/js/vendor/**']
 
gulp.task('default', function() {
  gulp.watch(jsfiles, function() {
    gulp.src(jsfiles)
      // action or filter...
      .pipe(using())
      // ...
  })
})

Output:

[12:18:43] Running 'default'...
[12:18:43] Finished 'default' in 14 ms
[12:18:43] Using ./src/js/index.js
[12:18:43] Using ./src/js/multiply.js
[12:18:43] Using ./src/js/square.js

Options

path

How the file path is displayed

  • Type: String
  • Default: cwd
  • Values: cwd, path, relative

color

How the file path is colored

  • Type: String
  • Default: magenta
  • Values: black, blue, cyan, gray, green, magenta, red, white, yellow

prefix

Message shown before the file path

  • Type: String
  • Default: Using

filesize

Filesize shown after the file path

  • Type: Boolean
  • Default: false
// ...
.pipe(using({prefix:'Using file', path:'relative', color:'blue', filesize:true}))

Output:

[12:18:43] Running 'default'...
[12:18:43] Finished 'default' in 14 ms
[12:18:43] Using file index.js
[12:18:43] Using file multiply.js
[12:18:43] Using file square.js

Package Sidebar

Install

npm i gulp-using

Weekly Downloads

2,432

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jeromedecoster