@rocketclimb/tw-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

tw-utils

npm License Build

Overview

tw-utils is a utility library designed to assist in parsing Tailwind CSS configurations on creating Tailwind plugins.

Features

  • Parse Tailwind CSS configuration files easily.
  • Parse extend configuration merging with default or base configuration

Installation

To install tw-utils, use npm or yarn:

npm install tw-utils

# or

yarn add tw-utils

Usage

Parsing Tailwind Config You can use tw-utils to parse your Tailwind CSS configuration file. Here’s an example:

import { configResolver } from "./config-resolver";
// config is the Tailwind helper for looking up values in the user’s Tailwind configuration as documented at https://tailwindcss.com/docs/plugins
configResolver("path", config);

Resolver options

export type ResolverOptions<T> = {
  rootPath?: string; // change the intial path for the lookup
  defaultConfig?: T; // add default configuration
};

License

This project is licensed under the MIT License. See the LICENSE file for details.

Package Sidebar

Install

npm i @rocketclimb/tw-utils

Weekly Downloads

142

Version

0.0.2

License

MIT

Unpacked Size

22.9 kB

Total Files

24

Last publish

Collaborators

  • amorimjj
  • programad