https://github.com/eccentricvamp/freshwind
Deno Fresh plugin for working with Twind v1
https://github.com/eccentricvamp/freshwind
deno
Last synced: about 1 year ago
JSON representation
Deno Fresh plugin for working with Twind v1
- Host: GitHub
- URL: https://github.com/eccentricvamp/freshwind
- Owner: EccentricVamp
- License: mit
- Created: 2022-09-18T23:46:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T14:45:27.000Z (over 3 years ago)
- Last Synced: 2025-04-05T23:47:45.294Z (about 1 year ago)
- Topics: deno
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Freshwind
A [Fresh](https://fresh.deno.dev/) plugin for working with [Twind v1](https://github.com/tw-in-js/twind/)
Based on the [existing plugin](https://github.com/denoland/fresh/tree/1b3c9f2569c5d56a6d37c366cb5940f26b7e131e/plugins)
with tweaks from psimk's [sanban](https://github.com/psimk/sanban/blob/main/plugins/twind.ts)
## Usage
```typescript
// twind.config.ts
import { defineConfig } from "@twind/core";
import presetTailwind from "@twind/preset-tailwind";
// Twind v1 configuration
// Learn more at https://twind.style/installation
export default defineConfig({
presets: [presetTailwind()],
});
// Make sure you export your config's URL
// so that it can referenced in islands
export const configURL = import.meta.url;
```
```typescript
// main.ts
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
import freshwind from "freshwind/plugin.ts";
import config, { configURL } from "./twind.config.ts";
await start(manifest, {
plugins: [freshwind(config, configURL)],
});
```
```tsx
// routes/index.tsx
export default function Home() {
return (
Welcome to `fresh`. Try update this message in the ./routes/index.tsx
file, and refresh.
);
}
```