Nodejs API?
See original GitHub issueI would love to be able to use this server sided in my esbuild setup, either as an esbuild plugin, or, preferably, as a JS api.
Something like.
const windicss = require('windicss');
const instance = windicss.createInstance({
preflight: true,
mode: 'compile',
... config,
});
const { html, styles } = instance.parse('<div class="rounded text-white bg-gray-400">Hello</div>');
I can already do this in tailwind by proxy of postcss but i prefer the syntax of grouping of windicss instead.
Do you foresee that this might be added?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Node.js - RESTful API - Tutorialspoint
Node.js - RESTful API, REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol.
Read more >Creating a Secure Node.js REST API - Toptal
REST APIs are so useful and ubiquitous that every web developer should know how to build them. Here's how to build a Node.js...
Read more >How to Build REST API with Node.js from Scratch - Edureka
This article on Building a REST API with Node.js will give you a step by step demostration for creating a CRUD application using...
Read more >What is REST API in Node.js ? - GeeksforGeeks
The API (Application Programming Interface) is a set of commands, functions, or protocols that act as an intermediary that enables two ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reference https://github.com/windicss/windicss/blob/main/example/interpretMode.ts
similar in js file too.
Here is a example in our docs site using Windi CSS API
https://github.com/windicss/docs/blob/main/.vitepress/theme/composables/useWindiCSS.ts