tw-helper

1.0.9 • Public • Published

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.

Package Sidebar

Install

npm i tw-helper

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

46.6 kB

Total Files

4

Last publish

Collaborators

  • don_ana