简体   繁体   中英

Is there a way I can run my tailwind CSS website outside the visual studio code IDE and Live server?

I created a website using HTML, JS and tailwind CSS. The tailwind CSS was installed using the CLI tool following the procedures in the documentation and is working fine when the page is executed with live server in Visual Studio Code.

npm install -D tailwindcss 

and then created a tailwindcss.config.js with

npx tailwindcss init

Now the problem is, how do I share this whole website to a friend so that he can simply run the index.html file and he sees a completely working website running the tailwindcss code too without him having to install and configure tailwindcss. Or if there is a way to export the project with all installed packages. Because so far, it just runs the plain html code whenever I try to share the whole project or even if I simply try to execute the page outside VsCode.

Perhaps a possible solution to share is to host a live project on an online editor, this example uses Vite to build an environment for Tailwind and Vanilla JavaScript, it does not have much configurations but can be forked to try.

If other tools are preferred, consider start a new project in such online editor from a template with Tailwind, or start a new Node.js project and use the terminal to install needed packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM