git-stats/package.json

289 lines
9.4 KiB
JSON
Raw Normal View History

2015-01-25 19:54:34 +01:00
{
"bin": {
"git-stats": "bin/git-stats"
},
2015-01-25 19:54:34 +01:00
"name": "git-stats",
2022-08-03 11:25:47 +02:00
"version": "3.1.0",
"description": "Local git statistics including GitHub-like contributions calendars.",
2015-01-26 09:07:33 +01:00
"main": "lib/index.js",
2015-01-25 19:54:34 +01:00
"scripts": {
2015-07-13 07:36:48 +02:00
"test": "node test",
2015-10-11 10:49:13 +02:00
"postinstall": "node scripts/migration/2.0.0.js"
2015-01-25 19:54:34 +01:00
},
2017-03-20 18:18:12 +01:00
"author": "Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)",
2015-02-17 20:14:59 +01:00
"contributors": [
"Gnab <as0n@gnab.fr>",
2015-05-04 10:56:55 +02:00
"William Boman <william@redwill.se>",
"Fabian Furger <mystyfly@gmail.com>",
"Jonah Lawrence <jonah@freshidea.com>"
2015-02-17 20:14:59 +01:00
],
2015-12-03 14:02:50 +01:00
"license": "MIT",
2015-01-26 09:03:05 +01:00
"repository": {
"type": "git",
"url": "https://github.com/IonicaBizau/git-stats.git"
},
"keywords": [
"git",
"stats",
"github",
"cli"
],
"bugs": {
"url": "https://github.com/IonicaBizau/git-stats/issues"
},
2015-02-09 13:20:21 +01:00
"homepage": "https://github.com/IonicaBizau/git-stats",
"dependencies": {
2015-07-13 08:43:16 +02:00
"abs": "^1.0.0",
"bug-killer": "^4.0.0",
2016-10-26 13:03:10 +02:00
"cli-gh-cal": "^1.4.0",
2015-07-13 08:43:16 +02:00
"cli-pie": "^2.0.0",
"deffy": "^2.2.2",
2015-07-13 08:43:16 +02:00
"gitlog-parser": "0.0.4",
2020-10-12 17:18:23 +02:00
"gry": "^6.1.0",
2015-07-13 08:43:16 +02:00
"is-there": "^4.0.0",
"iterate-object": "^1.1.0",
"moment": "^2.29.3",
2015-07-13 08:43:16 +02:00
"r-json": "^1.0.0",
"tilda": "^4.3.3",
2015-09-14 16:29:40 +02:00
"typpy": "^2.1.0",
2015-07-13 08:43:16 +02:00
"ul": "^5.0.0",
"w-json": "^1.0.0"
},
"blah": {
2015-07-13 08:43:16 +02:00
"h_img": "http://i.imgur.com/Q7TQYHx.png",
2015-11-08 16:53:04 +01:00
"description": [
{
"p": "I'd be curious to see your calendar with all your commits. Ping me on Twitter ([**@IonicaBizau**](https://twitter.com/IonicaBizau)). :smile: Until then, here's my calendar:"
},
{
"img": {
"source": "http://i.imgur.com/PpM0i3v.png"
}
},
{
"h2": "Contents"
},
{
"ul": [
"[Installation](#cloud-installation)",
2015-11-08 16:53:04 +01:00
[
"[Usage](#usage)",
{
"ul": [
"[Importing and deleting commits](#importing-and-deleting-commits)",
"[Importing all the commits from GitHub and BitBucket](#importing-all-the-commits-from-github-and-bitbucket)",
"[What about the GitHub Contributions calendar?](#what-about-the-github-contributions-calendar)"
]
}
],
"[Documentation](#memo-documentation)",
"[How to contribute](#yum-how-to-contribute)"
2015-11-08 16:53:04 +01:00
]
}
],
"installation_command": {
"language": "sh",
"content": [
"# Install the package globally",
2015-12-08 09:11:29 +01:00
"npm i -g git-stats",
2017-12-24 12:01:54 +01:00
"",
2015-11-08 16:53:04 +01:00
"# Initialize git hooks",
"# This is for tracking the new commits",
"curl -s https://raw.githubusercontent.com/IonicaBizau/git-stats/master/scripts/init-git-post-commit | bash"
]
},
"installation": [
{
"h2": "Usage"
},
{
"h3": "Importing and deleting commits"
},
{
"p": [
"I know it's not nice to start your git commit calendar from scratch. That's why I created [`git-stats-importer`](https://github.com/IonicaBizau/git-stats-importer)a tool which imports or deletes the commits from selected repositories.",
"Check it out here: https://github.com/IonicaBizau/git-stats-importer",
"The usage is simple:"
]
},
{
"code": {
"language": "sh",
"content": [
"# Install the importer tool",
"$ npm install -g git-stats-importer",
"",
"# Go to the repository you want to import",
"$ cd path/to/my-repository",
"",
"# Import the commits",
"$ git-stats-importer",
"",
"# ...or delete them if that's a dummy repository",
"$ git-stats-importer --delete"
]
}
},
{
"h3": "Importing all the commits from GitHub and BitBucket"
},
{
"p": "Yes, that's also possible. I [built a tool which downloads and then imports all the commits you have pushed to GitHub and BitBucket](https://github.com/IonicaBizau/repository-downloader)!"
},
{
"code": {
"language": "sh",
"content": [
"# Download the repository downloader",
"$ git clone https://github.com/IonicaBizau/repository-downloader.git",
"",
"# Go to repository downloader",
"$ cd repository-downloader",
"",
"# Install the dependencies",
"$ npm install",
"",
"# Start downloading and importing",
"$ ./start"
]
}
},
{
"h3": "What about the GitHub Contributions calendar?"
},
{
"p": "If you want to visualize the calendars that appear on GitHub profiles, you can do that using [`ghcal`](https://github.com/IonicaBizau/ghcal)."
},
{
"code": {
"language": "sh",
"content": [
"# Install ghcal",
"$ npm install -g ghcal",
"",
"# Check out @alysonla's contributions",
"$ ghcal -u alysonla"
]
}
},
{
"p": [
"For more detailed documentation, check out the repository: https://github.com/IonicaBizau/ghcal.",
"If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/IonicaBizau/github-stats)--this is like `git-stats` but with data taken from GitHub."
]
},
{
"h2": "Using the configuration file"
},
{
"p": [
"You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.js`.",
"This file should export an object, like below (defaults are listed):"
]
},
{
"code": {
"language": "js",
"content": [
"module.exports = {",
" // \"DARK\", \"LIGHT\" or an object interpreted by IonicaBizau/node-git-stats-colors",
" \"theme\": \"DARK\"",
"",
" // The file where the commit hashes will be stored",
" , \"path\": \"~/.git-stats\"",
"",
" // First day of the week",
" , first_day: \"Sun\"",
"",
" // This defaults to *one year ago*",
" // It can be any parsable date",
" , since: undefined",
"",
" // This defaults to *now*",
" // It can be any parsable date",
" , until: undefined",
"",
" // Don't show authors by default",
" // If true, this will enable the authors pie",
" , authors: false",
"",
" // No global activity by default",
" // If true, this will enable the global activity calendar in the current project",
" , global_activity: false",
"};"
]
}
},
{
"p": "Since it's a js file, you can `require` any other modules there."
},
{
"h2": "Saving the data as HTML and images"
},
{
"p": [
"`git-stats --raw` outputs raw JSON format which can be consumed by other tools to generate results such as HTML files or images.",
"[`git-stats-html`](https://github.com/IonicaBizau/git-stats-html) interprets the JSON data and generates an HTML file. Example:",
{
2016-12-22 11:38:22 +01:00
"code": {
"content": [
"# Install git-stats-html",
"npm install -g git-stats-html",
"",
"# Export the data from the last year (generate out.html)",
"git-stats --raw | git-stats-html -o out.html",
"",
"# Export data since 2015 (save the results in out.html)",
"git-stats --since '1 January 2015' --raw | ./bin/git-stats-html -o out.html --big"
],
"language": "sh"
}
},
"After we have the HTML file, we can generate an image file using [`pageres`](https://github.com/sindresorhus/pageres) by [**@sindresorhus**](https://github.com/sindresorhus/):",
{
2016-12-22 11:38:22 +01:00
"code": {
"content": [
"# Install pageres",
"npm install -g pageres-cli",
"",
"# Generate the image from HTML",
"pageres out.html 775x250"
],
"language": "sh"
}
}
]
},
2015-11-08 16:53:04 +01:00
{
"h2": "Cross-platform compatibility"
},
{
"p": [
"`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.",
"If you run `git-stats` to display graph on Windows, please use a terminal that can properly display ANSI colors.",
"Cygwin Terminal is known to work, while Windows Command Prompt and Git Bash do not. Improvements are more than welcome! :dizzy:"
]
}
],
"press": {
"ul": [
"[*A GitHub-like contributions calendar, but locally, with all your git commits*, The Changelog](https://changelog.com/github-like-contributions-calendar-locally-git-commits/)"
]
}
2016-04-26 06:54:50 +02:00
},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
2017-03-20 18:18:12 +01:00
"scripts/",
2016-04-26 06:54:50 +02:00
"resources/",
"menu/",
"cli.js",
2017-09-08 12:55:50 +02:00
"index.js",
"bloggify.js",
"bloggify.json",
"bloggify/"
2016-04-26 06:54:50 +02:00
]
2022-06-06 22:40:56 +02:00
}