npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

git-diff-archive

v1.2.0

Published

Archive of the diff files using node.js and git.

Downloads

50

Readme

git-diff-archive

Build Status npm version License Dependency Status devDependency Status

Archive of the diff files using node.js and git.

SCREEN SHOT

SCREEN SHOT

INSTALL

It is recommended a global installation.

$ npm install git-diff-archive -g

USAGE

Go to the working directory.
Then, run the git_diff_archive or gda command.

$ cd /your/project/dir
$ git_diff_archive HEAD HEAD~5
# or
$ gda HEAD HEAD~5

In the above example, to archive the difference file of the current HEAD and five previous HEAD.

Usage:

  git_diff_archive COMMIT, [OLD_COMMIT], {Options}


Description:

  Archive of the diff files using node.js and git.
  `COMMIT` and `OLD_COMMIT` is equivalent to the index that specify in the `git diff`.

  `PATH_SYNTAX` can be used in the `output` and `prefix` option.


Options:

  -h, --help                 Displays this help.
  -V, --version              Displays current version of this package.
  -v, --verbose              Show the append files and use git command.
  -n, --dry-run              Don't actually create the files. just show what would be done.
  -f, --format (zip|tar)     Specified in the `zip` or `tar` the format of the archive.
  -o, --output               Output destination path of the archive. (Use `PATH_SYNTAX`)
  -p, --prefix               Prefixed to the filenames in the archive. (Use `PATH_SYNTAX`) [default: <current-dir>]
  -P, --no-prefix            Prefix nothing to the filenames in the archive.
  -b, --base                 Rebase the file paths in the archive. Specified path will be the root.
  -F, --diff-filter          `git diff --diff-filter` and a similar designation.
      (A|C|D|M|R|T|U|X|B|*)


PATH_SYNTAX:

  {dirname}   Current git directory name when you call the command.
  {date}      Today's date.
  {time}      Current time.
  {datetime}  {date} and {time}.
  {random}    Random strings.
  {format}    Archive format specified in the option.


Defaults:

  --verbose     = false
  --dry-run     = false
  --format      = zip
  --prefix      = {dirname}
  --output      = {dirname}-{datetime}.{format}
  --base        = .
  --diff-filter = ACDMRTUXB


Examples:

  git_diff_archive
  git_diff_archive HEAD~3
  git_diff_archive HEAD~2 -v
  git_diff_archive HEAD~5 -n
  git_diff_archive HEAD HEAD~3
  git_diff_archive 85d59ab
  git_diff_archive 596a7ca f489d4a
  git_diff_archive HEAD~5 -p diff-files
  git_diff_archive HEAD~5 -o tmp/{dirname}.zip
  git_diff_archive HEAD~5 -f tar -o output.{format}
  git_diff_archive HEAD~2 HEAD~10 -F AMCR

REQUIREMENTS

  • Node.js 4.x~
  • git 2.x~

LICENCE

Released under the MIT Licence

AUTHOR

tsuyoshiwada


Bugs, feature requests and comments are more than welcome in the issues