gitwrap
Simple Git wrapper that doesn't get in the way.
Gitwrap provides a flexible way to use git from nodejs, without attempting to wrap common operations using JavaScript constructs.
var gitwrap = ; var git = gitwrap; git;
Installation
Install gitwrap
by running:
$ npm install --save gitwrap
Documentation
gitwrap.create(String directory)
Create an instance of gitwrap
around a directory that happens to be a git repository.
var git = gitwrap;
git#execute(String command, Function callback)
Execute a git command in the selected repository.
An error with a code ENOGIT
will be returned if git
was not found in the system.
var git = gitwrap; git;
git#isGitRepository(Function callback)
Check that the selected directory is indeed a git repository.
var git = gitwrap; git;
Tests
Run the test suite by doing:
$ gulp test
Contribute
- Issue Tracker: github.com/jviotti/gitwrap/issues
- Source Code: github.com/jviotti/gitwrap
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
$ gulp lint
Support
If you're having any problem, please raise an issue on GitHub.
ChangeLog
v1.1.0
- Change git not found error code to
ENOGIT
. - Improve unit testing.
License
The project is licensed under the MIT license.