I'm trying exclude paths in Pug, that should not be among compiled files in dist folder, but nothig help!.
I renamed dir parts to _parts, parts/footer.pug to _parts/_footer.pug, but I still see compiled files in dist/_parts/ dir.
So, how can exclude some paths in Pug. (I use pug-cli as compiler)?
Yes it's possible with bash And if you're on Windows, you can use git bash You just need to prefix the ignored file with "_"
So, suppose your project directory looks like this:-
you can do:-
pug -w "$(ls ./pugjs/!(_*))" -o ./
Now what does this line do? basically, the "$(ls ./pugjs/!(*))" lists all files that don't have the prefix "" they get passed as files paths argument to pug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With