Skip to content

Check whether current branch code ahead of master before building

Notifications You must be signed in to change notification settings

yqz0203/check-code-ahead-of-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check-code-ahead-of-master

Check whether current branch code ahead of master before building

Install

npm i check-code-ahead-of-master

Usage

Add a command before your building command in package.json, for example

scripts: {
  "build": "ccaom && webpack...",

The ccaom command does following things:

  1. if git has remote repository, the command will check remote origin/master branch otherwise will check local mater branch.

  2. if current branch is behind master, the command will throw an error and abort the process.

Licence

MIT

About

Check whether current branch code ahead of master before building

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published