0.2.1-3 • Published 4 years ago

add-commit-push v0.2.1-3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

add-commit-push

Build Status Codecov Version

Description

acp is my own CLI to add, commit and push in one line.

Why this project

  • because I was boring
  • because I was lazy and using add then commit then push was not optimized
  • because it forces me to respect a line of conduct for my commits
  • because I can
  • because I wanted to use typescript for one of my project

Requirements

How it works

install acp globally

npm i add-commit-push -g

then run acp from your project folder

acp a p "my new commit"

it will add, commit then push the following message: "project add: my new commit"

the commit respect the following template "target action: message"

by default, acp will use the default preset

the first argument is the action, here is the mapping of this argument for the default preset:

  • a → add
  • d → delete
  • r → refactor
  • f → fix
  • s → setup
  • u → update

the second argument is the target, here is the mapping of this argument for the default preset:

  • d → documentation
  • t → test
  • p → project

Preset

you can add your own preset in the root of your github project to customise the commit message template.

the file should be named "acp.config.json", you can see an example in the github repository of this project.

Tags available

you can also add several tags into that command

The flag -H or --help

the flag show the helper of acp.

it also can help you to see what is the current preset used by acp.

The flag -S or --source

the flag allow you to add only several source files inside the commit.

for example:

acp a p "my new commit" -S README.md --source packages.json

will only commit these two files.

if none of these flags are mentionned, then "git add ." will be used.

The flag -Y or --yes

the flag allow you to push without any confirmation to win even more time.

Changelog

v0.0.0

  • add acp command
  • add presets

v0.1.0

  • add source (-H/--help) flag
  • add source (-S/--source) flag
  • add source (-Y/--yes) flag
  • add name and contributors to acp config file
  • fix branch to point to the current branch and not master
  • error handling when the command is trying to push something when the repository need a pull

v0.1.1

  • fix default configuration returned an error

v0.1.2

  • fix new branch commit returned error due to "git rev-parse @{u}"

v0.1.3

  • error handling when the command is running when the repository is already up to date

v0.2.0

  • refactor in a functional way
  • the command shows every errors and not only the first one encountered

v0.2.1

  • error handling when the command is running outside a repository
  • format for errors that show a list of possibilities such as the error when there is too much arguments
  • fix readme errors and formulations
0.2.1-3

4 years ago

0.2.1-2

4 years ago

0.2.1-1

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.2-1

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago