gulp-absolute

0.0.1 • Public • Published

gulp-absolute

Gulp filter. Reduces a group of files to a single element according to its absolute path

Install

Install with npm

npm install --save-dev gulp-absolute

Example

With a watch action, when you just saved a javascript file, jshint only this file, not all the package

var absolute = require('gulp-absolute');
var jshint   = require('gulp-jshint');
var stylish  = require('jshint-stylish');
 
var jsfiles  = './src/js/**/*.js';
 
gulp.task('default', function() {
  gulp.watch(jsfiles, function(e) {
    gulp.src(jsfiles)
      .pipe(absolute(e.path))
      .pipe(jshint('.jshintrc'))
      .pipe(jshint.reporter(stylish))
  });
});

Option

You can reverse the selection, include all files except the specified absolute path

// ...
.pipe(absolute(e.path, true))

/gulp-absolute/

    Package Sidebar

    Install

    npm i gulp-absolute

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • jeromedecoster