UNPKG

1.81 kBMarkdownView Raw
1# Dugite - JS bindings for Git
2
3This project provides bindings for Node applications to interact with Git repositories, using the same command line interface that core Git offers.
4
5The source is in TypeScript, but can be consumed by any JavaScript application.
6
7### Getting Started
8
9Add it to your project:
10
11```
12> npm install dugite --save
13```
14
15Then reference it in your application:
16
17```js
18import { GitProcess, GitError, IGitResult } from 'dugite'
19
20const pathToRepository = 'C:/path/to/git/repository/'
21
22const result = await GitProcess.exec([ 'status' ], pathToRepository)
23if (result.exitCode === 0) {
24 const output = result.stdout
25 // do some things with the output
26} else {
27 const error = result.stderr
28 // error handling
29}
30```
31
32### Features
33
34 - make it easy to work with Git repositories
35 - use the same commands as you would in a shell
36 - access to the full set of commands, options and formatting that Git core uses
37 - access to the latest features of Git
38
39### Supported Platforms
40
41 - Windows 7 and later
42 - macOS 10.9 and up
43 - Linux (tested on Ubuntu Precise/Trusty and Fedora 24)
44
45### Status
46
47This project is under active development for Git-related projects at GitHub. This will stabilize as this library gets more usage in production, and is open to external contributions that align with the project's goals.
48
49If you are interested in getting involved with this project, refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file for instructions and the [documentation](./docs/) sections for more information about the project.
50
51### Roadmap
52
53As this is under active development, the roadmap is also subject to change. Some ideas:
54
55 - authentication support in-the-box
56 - make environment setup easier to override
57 - API additions for common tasks such as parsing output
58 - error handling improvements