Returns a JavaScript date object with the date and time of a git repository's first commit.
npm install first-commit-date> Returns a JavaScript date object with the date and time of a git repository's first commit.
Install with npm
``sh`
$ npm i first-commit-date --save
`js
var firstCommitDate = require('first-commit-date');
firstCommitDate(function(err, date) {
if (err) return console.log(err);
console.log('first commit!', date);
});
//=> first commit! Tue Nov 17 2015 13:29:18 GMT-0500 (EST)
`
Params
* cwd {String}: current working directorycallback
* {Function}returns
* {Object}
Example
`js`
firstCommitDate('foo/.git', function(err, date) {
if (err) return console.log(err);
// do stuff with commit date
});
Synchronously get the first commit date from a git repository.
Params
* cwd {String}: current working directoryreturns
* {Object}
Example
`js`
var date = firstCommitDate.sync('foo/.git');
* git-repo-name: Get the repository name from the git remote origin URL. | homepage
* git-user-name: Get a user's name from git config at the project or global scope, depending on… more | homepage
* git-username: Get the username from a git remote origin URL. | homepage
* github-base: Base methods for creating node.js apps that work with the GitHub API. | homepage
Install dev dependencies:
`sh``
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
+ github/jonschlinkert
+ twitter/jonschlinkert
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
*
_This file was generated by verb-cli on November 22, 2015._