https://github.com/manovotny/git-jiggy
https://github.com/manovotny/git-jiggy
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/manovotny/git-jiggy
- Owner: manovotny
- License: mit
- Created: 2019-03-14T21:52:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-08T21:00:56.000Z (over 5 years ago)
- Last Synced: 2025-04-23T01:58:34.029Z (17 days ago)
- Language: JavaScript
- Size: 8.84 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-jiggy
> A fresh collection of node git utilities.
[](https://www.youtube.com/watch?v=3JcmQONgXJM)
## Installation
### NPM
```
$ npm i git-jiggy
```### Yarn
```
$ yarn add git-jiggy
```## Usage
```
const {getLastModifiedDate} = require('git-jiggy');(async () => {
const filePath = './path/to/some/file.txt';
const date = await getLastModifiedDate(filePath);console.log(date);
// $ 2018-09-02T18:58:18.000Z
})();
```## API
All methods have a `Promise` interface.
### `add(files)`
Stages files for commit.
#### files
Type: `String` or `Array`
### `amendCommit()`
Amends commit with currently staged files, without editing the message.
### `getFilesInLastCommit()`
Gets the files in the last commit.
### `getLastModifiedDate(file)`
Gets the last modified date of the file passed in.
#### file
Type: `String`
### `getStagedFiles()`
Gets the files that are currently staged.
## License
MIT © [Michael Novotny](https://manovotny.com)