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

dgit

v0.0.6

Published

A simple CLI for download git repository files.

Downloads

7

Readme

dgit

一个用来下载git仓库文件的命令行工具

git会记录一个项目所有的历史修改,所以通常会很大。有时候你只需要下载一个项目的源代码,或者仅仅只需要其中的一个目录或文件,但是github不提供这样的功能,你需要先clone整个项目,非常麻烦。

这个小工具可以帮你解决这些问题,它包含这些功能:

  1. 下载一个git仓库的所有文件
  2. 下载一个git仓库的某个目录或某个文件
  3. 下载时可以指定分支/tag/commit hash

安装

可以通过npm全局安装 (如果速度较慢可以使用淘宝提供的镜像)

npm install dgit -g

如果你使用mac,需要在命令前面加上sudo

安装完以后,就可以使用dgit命令了

使用方式

用下载react作为例子

1.下载整个项目
dgit facebook/react

现在在你当前所处的目录下就会多一个react目录,里面包含react项目的所有文件

2.下载react的src目录
dgit facebook/react/src

现在在你当前所处的目录下就会多一个src目录,里面包含react/src的所有文件

3.指定分支

使用参数-r--ref可以指定branchtagcommit hash

dgit facebook/react/css -r gh-pages
4.指定tag
dgit facebook/react/src -r v15.6.1
5.指定commit hash
dgit facebook/react/src -r b5ac963
6.指定安放文件的目录
dgit facebook/react/src ./download

TODO

目前暂时只支持托管到github上的公开仓库,计划支持gitlab,bitbucket以及国内的码云