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

tw-helper

v1.0.9

Published

A CLI tool providing useful helper functions for developers using Tailwind CSS

Downloads

14

Readme

CLI Helper For Tailwind CSS Awesome

GitHub Actions Workflow Status Codecov GitHub last commit

Contents

Motivation

How many times you forgot what the helper classes for line-height were, or what the default breakpoints for Tailwind CSS are? Tw-helper is a command-line tool that provides fast, and easy to use commands retrieving information on Tailwind CSS, so you don't have to necessarily go browse documentation and lose focus!

Usage

Option 1: Use directly with npx

npx tw-helper

Option 2: Install globally

npm install -g tw-helper

Option 3: Install to project local scope

npm install tw-helper --save-dev

Add tw-helper command to PATH variable

export PATH=$PATH:./node_modules/.bin

Commands

colors Command

NOTE: 24-bit True color for command line is required for the colors to show up correctly.

The colors command allows you to list the colors on the Tailwind CSS project.

Syntax:

tw-helper colors [options]

Options:

  • -d, --default:

    Use this flag to list the default color palette from Tailwind CSS.

    Example:

    tw-helper colors --default

    This command will print the default set of colors provided by Tailwind CSS.

  • -c, --config <file>:

    Use this flag to provide a custom Tailwind CSS configuration file. The file should specify custom colors used in your project. This flag is only required, if the Tailwind CSS configuration file is renamed, or relocated from the project root.

    Example:

    tw-helper colors --config "/path/to/your-config.js"

    This command will print the colors defined in the specified configuration file.

Example output:

tw-helper colors

colors command output

Example output:

tw-helper colors -d

colors --default command output

breakpoints Command

The breakpoints command allows you to list the breakpoints on the Tailwind CSS project.

  • -c, --config <file>:

    Use this flag to provide a custom Tailwind CSS configuration file. The file should specify custom colors used in your project. This flag is only required, if the Tailwind CSS configuration file is renamed, or relocated from the project root.

    Example:

    tw-helper breakpoints --config "/path/to/your-config.js"

Example output:

tw-helper breakpoints

breakpoints command output

css Command

The css command allows you to list the Tailwind CSS helper classes associated for the provided css property. Also provides a link to the Tailwind CSS documentation for the given property.

Syntax:

tw-helper css <property>

Property:

  • Css property to list the Tailwind CSS classes for.

Example output:

tw-helper css opacity

css command output

Contributing

All contributions are welcome, please read how to contribute first.