Repository
Current version released
4 years ago
twd v0.2.3
Simple tailwind like CLI tool for deno 🦕
This tool uses twind internally.
Install
deno install --allow-read=. --allow-write=. --allow-net=deno.land,esm.sh,cdn.esm.sh -fq https://deno.land/x/twd@v0.2.3/cli.ts
Usage
Call twd
command with html file input.
twd input.html
This outputs the tailwind compatible stylesheet which is needed by the input file.
You can specify more than 1 input file.
twd input-a.html input-b.html
This outputs the stylesheet which include classes needed by any of the input files.
Watch files
You can watch files with -w, --watch
option.
twd -w input-a.html input-b.html -o styles.css
When you use -w
option, you also need to specify -o, --output
option, which
specifies the output file for generated styles.
Configuration
You can configure the output through ‘twd.ts’ file.
You can create the boilerplate code with -i
(–init) option.
twd -i
This creates the config file ‘twd.ts’ like the below:
import { Config } from "https://deno.land/x/twd@0.2.0/types.ts";
export const config: Config = {
preflight: true,
theme: {},
};
You can configure preflight
and theme
options. See
twind documentation
for details.
TODOs
- Provide
twd/colors
module - Provide tailwind compatible purging
- Do not require net permission in install command (this is required to import twd.ts from cwd)
License
MIT