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

rustywind

v0.22.0

Published

CLI for organizing Tailwind CSS classes

Downloads

13,168

Readme

RustyWind Mean Bean CI npm version

Install

Available via npm

yarn global add rustywind

or

npm install -g rustywind

or

Install from homebrew (mac and linux):

brew install avencera/taps/rustywind

or

Install from a github release:

curl -LSfs https://avencera.github.io/rustywind/install.sh | sh -s -- --git avencera/rustywind

or

Download a release directly from github: github.com/avencera/rustywind/releases

or

You can use the dockerized version

docker run --rm -v $PWD:/app avencera/rustywind:latest <rustywind arguments>

Usage

Run rustywind with a path to output updated file contents to the terminal:

  • rustywind .

If you want to reorganize all classes in place, and change the files run with the --write flag

  • rustywind --write .

Run rustywind with a path and the --dry-run to get a list of files that will be changed:

  • rustywind --dry-run .

Run rustywind on your STDIN:

  • echo "<FILE CONTENTS>" | rustywind --stdin

Run in CI, exit with error if unsorted classes are found:

  • rustywind --check-formatted .

Run RustyWind with a custom sorter. The config_file.json should have a top level entry of sortOrder which is an array with the classes listed in the order you want them sorted.

  • rustywind --config-file config_file.json

Use with tailwind prettier plugin

  • rustywind --output-css-file <path to the tailwind generated css file>

  • rustywind --vite-css <url to the css generated by vite>

Usage: rustywind [OPTIONS] [PATH]...

Run rustywind with a path to get a list of files that will be changed
  rustywind . --dry-run

If you want to reorganize all classes in place, and change the files run with the `--write` flag
  rustywind --write .

To print only the file names that would be changed run with the `--check-formatted` flag
  rustywind --check-formatted .

If you want to run it on your STDIN, you can do:
  echo "<FILE CONTENTS>" | rustywind --stdin

Arguments:
  [PATH]...
          A file or directory to run on

Options:
      --stdin
          Uses stdin instead of a file or folder

      --write
          Changes the files in place with the reorganized classes

      --dry-run
          Prints out the new file content with the sorted classes to the terminal

      --check-formatted
          Checks if the files are already formatted, exits with 1 if not formatted

      --allow-duplicates
          When set, RustyWind will not delete duplicated classes

      --config-file <CONFIG_FILE>
          When set, RustyWind will use the config file to derive configurations. The config file current only supports json with one property sortOrder, e.g. { "sortOrder": ["class1", ...] }

      --output-css-file <OUTPUT_CSS_FILE>
          When set RustyWind will determine the sort order by the order the class appear in the the given css file

      --vite-css <VITE_CSS>
          When set RustyWind will determine the sort order by the order the class appear in the CSS file that vite generates.
          
          Please provide the full URL to the CSS file ex: `rustywind --vite-css "http://127.0.0.1:5173/src/assets/main.css" . --dry-run`
          
          Note: This option is experimental and may be removed in the future.

      --skip-ssl-verification
          When set, RustyWind will skip SSL verification for the vite_css option

      --ignored-files <IGNORED_FILES>
          When set, RustyWind will ignore this list of files

      --custom-regex <CUSTOM_REGEX>
          Uses a custom regex instead of default one

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

What

Inspired by Ryan Heybourn's headwind vscode plugin. This is a CLI tool that will look through your project and sort all Tailwind CSS classes.

It will also delete any duplicate classes it finds.