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

slj-cli

v1.0.8

Published

A command cli for slj

Downloads

8

Readme

slj-cli

A comamnd cli program for personal.It provides a series of personalized function like download and similar to vue-cli etc.

Install

npm install -g slj-cli

Usage

slj download(下载文件)

-u --url specify the download path.
-n --file-name specify the download file name.
-d --dest specify the download storage path.
-e --extract-path specify the zip file extract path.

第一个option -u是必须的,后面两个可有可无.

第二个option -n如果不提供,那么下载文件的名字按照以下规则生成:

第三个option -d如果不提供,那么下载文件的存放路径就是process.env.PWD(详细了解)

第四个option -e如果提供了并且下载的文件是一个zip包,下载完就会自动解压到指定的路径

. 下载地址带文件后缀名,那么文件名就从下载地址中截取, eg:

  https://www.test.com/test.png 文件名就是test.png

. 下载地址不带文件后缀名,那么文件名就会根据下载地址进行md5然后截取7位在前面加上slj-, eg:

  https://www.test.com/test 文件名就是类似于slj-dfasfjk.*

下载的文件如果是zip压缩包,下载完会自动询问是否进行解压。如果需要解压提供解压路径之后就会自动解压,暂不支持其他类型压缩包的自动解压

slj scan <dir>(扫描指定目录下的静态文件,生成一个json文件)

-r --relative specify the scan relative path.
-i --ignore specify the scan ignore directories.
-n --json-name specify the generate json file name. Default is staticResource.json.
-d --dest specify the store path of the to be generated json file. Default is <dir>.

dir 就是指定需要扫描的项目的根目录.

目前暂不支持指定静态文件的类型(默认是css|less|scss|png|jp(e)g|gif|svg|ttf).

第一个option -r 这个参数是相对dir指定的,只扫描这个指定的目录下面的静态文件.

第二个option -i 这个参数如果-r指定了,那么ignore的参数就是相对relatice的,如果没有指定就相对于dir.

补充:因为commander.js单个option不支持常见命令行多值,所以这边采用 ~ 进行分隔,想指定多个ignore directories,就像如下指定:

-i node_moduels~.git~build // ignore node_modules .git build directory

slj init <project-name>(初始化一个项目)

使用方法和vue init相似,支持在线和本地的模板,目前本地的模板只有server这一个模板,后续会丰富。在线模板的话把模板的仓库地址填进去即可(目前仅支持github和gitlab的仓库