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

superid-cli-utils

v1.0.2

Published

cli utils for superid internal use

Downloads

10

Readme

Features

  • SuperId内部工具集,通过命令行提供一些功能的快捷支持,提高开发效率。
  • 基于Typescript,Commander开发,由father-build封装打包。

Install

npm install -g superid-cli-utils
# or, with yarn
yarn add global superid-cli-utils

# 安装完成后需要重启bash或者执行命令刷新环境变量才可以联想该命令行
# 默认Node安装时配置了npm的环境变量,使用yarn或者出现无法联想的情况
# 需要把yarn/npm对应的全局node_modules执行目录加入到环境变量Path才可以进行联想

# Mac
source /etc/profile

Usage

# Use global command 'superid' to get usage
superid -h
# or
superid --help

Develope

# install dependencies
yarn install

# Use father build to package and process with the typescript.
father build

# debug with output file in dist
node --inspect-brk dist/app.js -d <superid-root> [command]

Commands

全局参数说明:

  • -d --directory <directory> 在非superid-web根目录下执行superid时需要指定项目根路径(否则会以当前目录进行操作导致出现不可预知的错误)

svg-generator

基于蓝湖下载的设计SVG文件转换成直接可用的React SVG组件,操作步骤:

  1. 参考Install安装superid命令行
  2. 下载蓝湖设计的svg文件到本地路径
  3. 命令行输入superid svg-generator 后将文件拖到i-term获取该文件路径作为参数,然后输入SVG图片名
  4. 自行配置可选参数,执行命令,文件会生成到指定路径(注意:如果生成Svg组件文件已存在会被覆盖)

参数说明:

  • -c --clearfill 蓝湖下载的SVG默认会填fill属性导致CSS的fill不能生效,颜色自行控制的场景可以配置该选项剔除fill属性。
  • -p --position <position> 默认svg会放到superid-web/src/@superid/public/svgs目录下,可以指定web/forum/restaurant/font/tss对应项目的子仓(行业线仓暂时没有svg放置场景,需要时要修改SVG_PATH来兼容)

Test

目前svg-generator已经补充了测试用例,后续用例可以参考该文件,以.test.ts结尾并放置到test目录下

npm run test
# or
father test