Created
June 16, 2026 06:24
-
-
Save zecka/ae8aa65c348b513346215bfe16c5f677 to your computer and use it in GitHub Desktop.
tailwind-compile-with-node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { compile } from "tailwindcss"; | |
| const run = async () => { | |
| const compiledContent = ( | |
| await compile(` | |
| @theme { | |
| --container-md: 700px; | |
| } | |
| .test { | |
| color: red; | |
| @apply flex; | |
| @apply w-md; | |
| } | |
| `, { | |
| loadStylesheet: async (id, base) => { | |
| }, | |
| }) | |
| ).build([]) | |
| console.log(compiledContent); | |
| } | |
| run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment