JSPM

@rocketclimb/tw-utils

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 296
  • Score
    100M100P100Q103382F
  • License MIT

Tailwind utils package for rocketclimb plugins

Package Exports

  • @rocketclimb/tw-utils
  • @rocketclimb/tw-utils/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rocketclimb/tw-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.