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 🙏

© 2026 – Pkg Stats / Ryan Hefner

rawgiter

v1.1.0

Published

静态文件本地资源路径转rawgit

Readme

rawgiter

NPM

还在测试中,请不要在生产环境下使用

将静态资源内的本地路径转换为github远程仓库资源对应的rawgit地址,方便静态资源的部署

在使用github page的时候,如果远程仓库上有html内引用的静态资源,那么我们可以加一个rawgit头,在page服务的时候就可以正确加载需要的内容,rawgit的基本规则是:https://rawgit.com/:id/:repo/:branch/远程仓库路径

如果我们要手动修改HTML文档的静态资源,会比较麻烦,所以就写了一个工具,可以自动化地将项目内的静态资源转成rawgit形式(如果超出项目主目录的将不会转换) 此外,首次执行命令的时候会根据你填入的信息执行git config操作

安装

npm i rawgiter -g

基本使用

安装完成后直接在项目根目录下运行rawgiter,按照提示来操作,第一次在项目中使用时需要先配置信息,配置完成后会在项目下生成一个配置文件 忽略目录默认添加了node_modules,添加忽略目录的时候要将目录的相对路径补全,比如下面的目录树:

rawgiter
  |_ bin
  |   |_ index.js
  |
  |_ lib
  |   |_ cmd.js
  |   |_ fspath.js
  |
  |_demo
     |_ ignore1
     |     |_ ...
     |
     |_ ignore2
     |     |_ ...
     |
     |_ test

假设要添加忽略的目录ignore1和ignore2,那么应该输入demo/ignore1,ignore/demo2

测试的页面:demo

补充

有一部分代码来自Aaaaaaaty,并做了点修改

进度

  • 2018-9-27: 将添加处理目录修改为添加处理忽略目录(反操作),修复了不可以添加多个目录的问题,并且支持了上级目录查询