1.5.3 • Published 2 years ago

gulp-gitstage v1.5.3

Weekly downloads
12
License
MIT
Repository
github
Last release
2 years ago

gulp-gitstage

NPM version Build status Coverage Known Vulnerabilities License Prettier

plugin for gulp to stage files with git

Usage

A plugin for Gulp to stage an object stream of files on git.

First, install gulp-gitstage as a development dependency:

npm install --save-dev gulp-gitstage

Then, add it to your gulpfile.js:

const gitstage = require("gulp-gitstage");

const files = gulp.src("./src/*.ext").pipe(gitstage());

files.on("data", function (file) {
  console.log("Staged file:", file);
});

API

gitstage(options)

This plugin takes a single object as configuration. The available options are listed below. Note that all options are optional.

optiontypedescriptiondefault
gitCwdStringOverride from which directory git is executed."./"
stagedOnlyBooleanOnly stage previously staged files.false

Examples

const gitstage = require("gulp-gitstage");

// Stage all files in the pipe
gulp.src("./**/*").pipe(gitstage());
const gitstage = require("gulp-gitstage");

// Stage files only if they're already staged
gulp.src("./**/*").pipe(gitstage({ stagedOnly: true }));

Help

git not found on your system.

'gitCwd' must be a string.

pathspec 'path/to/file' did not match any files

Unable to create '.../.git/index.lock': File exists.

1.5.3

2 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago