vinyl-git

0.0.8 • Public • Published

vinyl-git NPM version Build Status Dependency Status

Get files as Vinyl File objects from git.

Why

Use it with husky. There are plenty projects, that are in terrible state, because of lacking of linting in development process. To get linting (and codestyle checks) in such kind of project and not be overwhelmed with linting errors from legacy code vinyl-git was created.

Just replace gulp.src with git.staged and run linting on only files, that are prepeared for commiting (just do not forget to add precommit hook with, husky).

Usage

var map = require('map-stream');
var git = require('vinyl-git');
 
var log = function(file, cb) {
  console.log(file.path);
  cb(null, file);
};
 
git.staged()
  .pipe(map(log))
  .pipe(fs.dest('./output'));

API

staged([options])

Returns stream with currently staged files. Options are same as in vinyl-fs src method.

License

MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)

Readme

Keywords

none

Package Sidebar

Install

npm i vinyl-git

Weekly Downloads

2

Version

0.0.8

License

MIT

Last publish

Collaborators

  • floatdrop