Basically I have a src folder, where I import Tailwind and a public folder where I generate my file.
I use PurgeCSS to minify my file size, so my build command looks like this
If you want to use the very same command you have to have cross-env and purgecss installed from npm.
And after building is finished, I reference the file like so:
public/index.html: styles.css
public/view/index.html: ../styles.css
public/send/index.html: ../styles.css
It's also worth noting that as far as I know, if you have let's say your styles and html inside a folder like so:
public/view/index.html
public/view/styles.css
you can't reference the styles with simply styles.css from the html even tho they are in the same folder. It's best to have all your css and js files in the root of the folder:
I hope this helps, you can check out the GitHub repo if you want too, or send me a message on dev if you have any more questions.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Basically I have a src folder, where I import Tailwind and a public folder where I generate my file.
I use PurgeCSS to minify my file size, so my build command looks like this
If you want to use the very same command you have to have cross-env and purgecss installed from npm.
And after building is finished, I reference the file like so:
styles.css
../styles.css
../styles.css
It's also worth noting that as far as I know, if you have let's say your styles and html inside a folder like so:
public/view/index.html
public/view/styles.css
you can't reference the styles with simply
styles.css
from the html even tho they are in the same folder. It's best to have all your css and js files in the root of the folder:I hope this helps, you can check out the GitHub repo if you want too, or send me a message on dev if you have any more questions.