|
||
---|---|---|
.gitignore | ||
README.md | ||
mod.js | ||
package.json |
README.md
last-git-commit-id
Asynchronously or synchronously get the last Git commit ID.
Usage
Asynchronous
import {
getLastGitCommitId
} from 'last-git-commit-id';
(async () => {
console.log(await getLastGitCommitId());
})();
Synchronous
import {
getLastGitCommitIdSync
} from 'last-git-commit-id';
console.log(getLastGitCommitIdSync());
Inspired by answers to the Get hash of most recent git commit in Node question on StackOverflow, but using the newer & simpler syntax.