I have a directory full of less css files. What is the best way to compile them to normal css? (for deployment)
Id like to run a command as follows:
The way I compiled less files to the corresponding css files in the current folder tree:
find ./ -name '*.less' -type f -exec lessc {} {}.css \; -exec rename -f 's/.less.css/.css/' {}.css \;
For example, if you have main.less
somewhere in the folder tree, you will get main.css
in the same folder.
But it requires rename
command to be installed. To install it with help of Homebrew:
brew install rename