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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wxss-transform

v0.1.5

Published

一款用于开发小程序wxss的命令行工具。wxss-transform 接收一个监听目录或文件,一个输出目录或文件。递归监听目录下所有文件变化,并输出项目代码到指定目录,输出前会将`stylus`或`css`文件转换为`wxss`文件,其他文件不处理。并不会进行打包,只是单纯的处理样式文件。

Readme

wxss-transform

一款用于开发小程序wxss的命令行工具。

wxss-transform 接收一个监听目录或文件,一个输出目录或文件

递归监听目录下所有文件变化,并输出项目代码到指定目录,输出前会将styluscss文件转换为wxss文件,其他文件不处理。并不会进行打包,只是单纯的处理样式文件。

特点

  • 当你进行微信小程序进行原生开发,并且喜欢使用styluscss进行样式开发时,可以使用这个工具
  • 可以将项目下./a目录复制到项目下./b目录,并对.css.stylus进行转换
  • 不会对项目中的依赖导入关系进行打包

安装

npm i -D|-g wxss-transform

使用

wxss <entry> <output>
  • entry
    • 可选。监听目录或文件。
    • 默认项目下./src目录
  • output
    • 若传入entry则为必选,否则可选。输出目录或文件
    • 默认项目下./dist文件

  • 本地安装

    • package.json中设置:

      {
        "script": {
      		"dev": "wxss ./src ./dist"
        }
      }
    • npx wxss ./src ./dist
  • 全局安装

    • 在项目目录下直接运行
    wxss ./src ./dist

常见问题

  1. 当我启动后,试着删除./src下的一个空目录或多级空目录时,会报出错误并退出程序

    解决方案:重新启动工具

    由于本项目是使用chokidar模块进行目录/文件监听的,这个问题是chokidar一直没有解决掉的Bug。

    所以,如果想对此Bug进行修复的各位,可以参考这个chokidar的一个Issues:

    https://github.com/paulmillr/chokidar/issues/566