1.0.1 • Published 6 years ago
safe-add-commit-changes v1.0.1
safe-add-commit-changes
git diff-index isn't enough sometimes. Espescially if you want to optimistically generate code then add and commit it in automation steps. This function lets us safely add and commit changes whether changes were made or not.
Install
yarn add -D safe-add-commit-changes
# or
npm i safe-add-commit-changes --save-dev Documentation
Table of Contents
safeAddCommitChanges
safeAddCommitChanges
Parameters
fileTypesstring what to git add - can be glob or type of files {snapshots|docs|tests|js} + more if custom patterns providedloggerObject a logger object with error and info methods (optional, defaultconsole)patternsObject a js object with key value pairs of pattern for additional fileType to path definitions (optional, default{})
Examples
<caption>Ex cli usage:
$ safeAddCommit docs
$ safeAddCommit snapshots
$ safeAddCommit src/*,jsReturns Promise resolves a success or failure to add changes
1.1.0-alpha.45961092
6 years ago
1.0.1
6 years ago