New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gulp-absolute

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-absolute

Filter files by absolute path

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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))

Keywords

gulpplugin

FAQs

Package last updated on 27 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts