Registry / devops / tailwind-transpiler

tailwind-transpiler

JSON →
library0.0.27jsnpmunverified

A tool (v0.0.27) that parses source files to extract custom Tailwind CSS class names used in HTML/JSX templates and consolidates them into a single JSON file. It relies on AST-based parsing to identify dynamic or custom class combinations that Tailwind's default purge might miss. The project is in early development with no release cadence; its key differentiator is focused extraction of custom classes for Tailwind's safelist, intended for build pipeline integration via npm scripts. Currently limited to default 'src' folder and outputs 'extracted-classes.json'.

npm install tailwind-transpiler
INSTALL
IMPORT
SIG · TAILWIND-TRANSPILE
T
tailwind-transpiler
devopsjavascriptv0.0.27
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extract-classes CLI
npx extract-classes
extract-classes
The package provides a CLI binary with name 'extract-classes', not a programmatic API. Use npx or add as npm script.
automated usage
{"scripts": {"extract": "extract-classes"}}
{"scripts": {"extract": "tailwind-transpiler"}}
Script expects the command name 'extract-classes', not the package name.
custom folder argument
extract-classes ./custom-folder
extract-classes --folder=./custom-folder
Pass target folder as positional argument, not a flag.

Install as dev dependency and run the CLI to extract custom Tailwind classes from source code into extracted-classes.json.

npm install tailwind-transpiler --save-dev // package.json "scripts": { "extract": "extract-classes" } npm run extract // Or with custom folder: npm run extract -- src/components
tt --version
Debug
Known issues
gotchaCLI name 'extract-classes' may conflict with other packages that expose a binary with same name.
fix
Use npx tailwind-transpiler or specify full path in npm scripts.
affects: >=0.0.1
deprecatedNo type definitions are exported for programmatic use; only CLI is supported.
fix
Use child_process.exec to invoke CLI programmatically.
affects: >=0.0.1
gotchaOutput overwrites 'extracted-classes.json' without prompt, potentially losing previous manual safelist entries.
fix
Back up existing file before running extraction.
affects: >=0.0.1
Errors
Common errors & fixes
bash: extract-classes: command not found
Binary not in PATH because npx not used or package not installed globally.
fix
Use npx extract-classes or add to npm scripts as shown.
ENOENT: no such file or directory, scan './src'
The default 'src' folder does not exist; must specify a valid folder.
fix
Run extract-classes <path-to-existing-folder>
Cannot find module 'tailwind-transpiler'
Package not installed or used in programmatic context incorrectly.
fix
Ensure npm install tailwind-transpiler --save-dev ran and use CLI only, not require().
Upgrade
Version history
0.0.27latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
tailwind-transpiler — npm install tailwind-transpiler · libregistry