git-prestine

0.2.1 • Public • Published

git-prestine

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

Install

yarn install git-prestine

Usage

To use just require and call

const prestine = require('git-prestine');

await prestine(); // 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 prestine = require('git-prestine/gulp');

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

Readme

Keywords

none

Package Sidebar

Install

npm i git-prestine

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • garbles