git-pristine

0.2.2 • Public • Published

git-pristine

A function that returns a rejected promise if you're not on a clean, up-to-date master branch

Install

yarn install git-pristine

Usage

To use just require and call

const pristine = require('git-pristine');
 
await pristine(); // throws if not clean, up-to-date, master

There is also a Gulp plugin for build scripts.

const gulp = require('gulp');
const webpack = require('gulp-webpack');
const pristine = require('git-pristine/gulp');
 
gulp.task('build', function() {
  return gulp.src('./src/index.js')
    .pipe(pristine()) // task fails if not clean, up-to-date, master
    .pipe(webpack())
    .pipe(gulp.dest('dist/'));
});

Readme

Keywords

none

Package Sidebar

Install

npm i git-pristine

Weekly Downloads

1

Version

0.2.2

License

MIT

Last publish

Collaborators

  • garbles