git-ray
💻🔫 - A nodejs library to call git commands written with RxJS
Install
yarn add git-ray
or
npm install git-ray
Usage
As Observable
Currently Supported Commands:
git-clone
git-pull
git-checkout
git-remote
git-fetch
All commands will have a function signature pattern like:
See child_process docs for spawn options and ChildProcess class definition.
;
const clone = ; ;
Currently, given the supported commands, the arguments are parsed as follows:
const clone = ; // This function invocation...; // Will produce this cli call// $> git clone --depth 1 repo
Which will be a problem for commands like git-remote
. Which would look like:
const remote = ; // This function invocation...; // Will produce this cli call// $> git remote origin link add// which is invalid. // Calling ...;// Will produce the desired// $> git remote add origin link
The parsing logic can change going forward when either:
- The commands become less intuitive
- It becomes a road block to implementing another git command