mirror of
https://github.com/ritz078/transform.git
synced 2026-11-21 08:33:55 +03:00
* Tailwind variants support (hover, focus, placeholder, etc. cases are transformed now) * Settings page let user define custom Tailwind configs, and "Tailwind preprocessor input" * Default tailwind.css built with SSG * Many fixes for corner cases
13 lines
404 B
TypeScript
13 lines
404 B
TypeScript
import { NextApiRequest, NextApiResponse } from "next";
|
|
import tailwindCss from "@utils/tailwindcss";
|
|
|
|
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
|
try {
|
|
const { tailwindConfig, postCssInput } = JSON.parse(req.body);
|
|
const css = await tailwindCss(tailwindConfig, postCssInput);
|
|
res.status(200).send(css);
|
|
} catch (e) {
|
|
res.status(500).send(e.message);
|
|
}
|
|
};
|