All Projects → kt3k → twd

kt3k / twd

Licence: MIT License
🚩 Simple tailwind like CLI tool for deno 🦕

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to twd

tailspin
Site generator and design system in one
Stars: ✭ 19 (-42.42%)
Mutual labels:  tailwind, deno
eleventy solo starter njk
Further development suspended as of 2021-09-11. Please refer instead to https://www.11ty.dev/docs/starter/ for a wide selection of other Eleventy starter sets.
Stars: ✭ 22 (-33.33%)
Mutual labels:  tailwind
youtube-deno
A Deno client library of the YouTube Data API.
Stars: ✭ 30 (-9.09%)
Mutual labels:  deno
deno-docker
Dockerfiles for Deno
Stars: ✭ 74 (+124.24%)
Mutual labels:  deno
denops-deno
🐜 Deno module for denops.vim
Stars: ✭ 16 (-51.52%)
Mutual labels:  deno
tailwind
🧛🏻‍♂️ Dark theme for Tailwind
Stars: ✭ 25 (-24.24%)
Mutual labels:  tailwind
cnpj
🇧🇷 Format, validate and generate CNPJ numbers in Node & Deno
Stars: ✭ 26 (-21.21%)
Mutual labels:  deno
deno-aws api
From-scratch Typescript client for accessing AWS APIs
Stars: ✭ 33 (+0%)
Mutual labels:  deno
play-tailwind
Play is free and open source Tailwind CSS template for - Startup, SaaS, Apps, Business and More. It comes with a high-quality design and all essential components & pages you need to launch a complete website.
Stars: ✭ 60 (+81.82%)
Mutual labels:  tailwind
Portfolio
I have created this portfolio in React and used tailwind for styling. In this portfolio, I have my 5 best projects to display. A contact form, which is in progress to post. You can email me through my email id which is at the bottom after the contact form. All the social icons are connected to my social profiles.
Stars: ✭ 16 (-51.52%)
Mutual labels:  tailwind
fast-base64
Fastest base64 on the web, with Wasm + SIMD
Stars: ✭ 23 (-30.3%)
Mutual labels:  deno
react-heroicons
Heroicons as React components
Stars: ✭ 39 (+18.18%)
Mutual labels:  tailwind
denoflow
Configuration as Code, use YAML to write automated workflows that run on Deno, with any Deno modules, Typescript/Javascript codes
Stars: ✭ 143 (+333.33%)
Mutual labels:  deno
typesql
TypeSQL - Generate Typescript API from raw MySQL queries. Compatible with Deno and Node.
Stars: ✭ 37 (+12.12%)
Mutual labels:  deno
vite-react-ts-tailwind-firebase-starter
Starter using Vite + React + TypeScript + Tailwind CSS. And already set up Firebase(v9), Prettier and ESLint.
Stars: ✭ 108 (+227.27%)
Mutual labels:  tailwind
destjs
Make beautiful APIs with the NestJS inspired framework for Deno
Stars: ✭ 31 (-6.06%)
Mutual labels:  deno
react-tailwind
This is a complementary React code for the tailwindcss project.
Stars: ✭ 29 (-12.12%)
Mutual labels:  tailwind
tailwindcss-variables
Easily create css variables without the need for a css file!
Stars: ✭ 47 (+42.42%)
Mutual labels:  tailwind
lesvim
Nvim config focus on Javascript, Typescript, Rust and Lua - 🚀 💪 ( Fast and Powerfull ) - Deno and other typescript LSP working well together
Stars: ✭ 69 (+109.09%)
Mutual labels:  deno
deno nightly
🌙 Nightly builds for Deno 🦕
Stars: ✭ 11 (-66.67%)
Mutual labels:  deno

twd v0.4.8

ci

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/[email protected]/cli.ts

Usage

Call twd command with input html files.

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-foo.html input-bar.html

This outputs the stylesheet for both input-foo.html and input-bar.html.

Or you can input the files under the directory by specifying the directory.

twd dir/

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.

Config

You can configure the output styles through config file 'twd.ts'.

You can create the boilerplate code with -i (--init) option.

$ twd -i
Creating config file 'twd.ts'
Done!

This creates the config file 'twd.ts' like the below:

import { Config } from "https://deno.land/x/[email protected]/types.ts";

export const config: Config = {
  preflight: true,
  theme: {},
  plugins: {},
};

Theme

Theming works almost the same way as theming in tailwind, or theming in twind.

The example of overriding values in the theme:

import { Config } from "https://deno.land/x/[email protected]/types.ts";

export const config: Config = {
  preflight: true,
  theme: {
    fontFamily: {
      sans: ["Helvetica", "sans-serif"],
      serif: ["Times", "serif"],
    },
    extend: {
      spacing: {
        128: "32rem",
        144: "36rem",
      },
    },
  },
};

Colors

The Tailwind v2 compatible color palette is available from https://deno.land/x/[email protected]/colors.ts.

import { Config } from "https://deno.land/x/[email protected]/types.ts";
import * as colors from "https://deno.land/x/[email protected]/colors.ts";

export const config: Config = {
  theme: {
    colors: {
      // Build your palette here
      gray: colors.trueGray,
      red: colors.red,
      blue: colors.lightBlue,
      yellow: colors.amber,
    },
  },
};

To extend the existing color palette use theme.extend:

import { Config } from "https://deno.land/x/[email protected]/types.ts";
import * as colors from "https://deno.land/x/[email protected]/colors.ts";

export const config: Config = {
  theme: {
    extend: {
      colors: {
        gray: colors.trueGray,
      },
    },
  },
};

Preflight

twd automatically provides reset stylesheet, modern-normalize, in the same way as tailwind or twind. By default twd inserts these styles at the beginning of the other styles.

This behavior can be disabled by preflight option in 'twd.ts' config file.

import { Config } from "https://deno.land/x/[email protected]/types.ts";

export const config: Config = {
  preflight: false,
};

Plugins

You can provide plugins in config file. Plugins are not tailwind compatible, but it follows the rules of twind plugins.

In twd.ts:

export config: Config = {
  plugins: {
    'scroll-snap': (parts) => ({ 'scroll-snap-type': parts[0] }),
  },
};

This generates the style .scroll-snap-x { scroll-snap-type: x; } in the output. See more details in twind plugin docs about what kind of plugins are possible.

TODOs

  • Expose APIs like generate(files, opts), watch(files, opts) to enable easily integrate this tool into another tool.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].