How do I compile a directory full of less css files to css?

后端 未结 14 624
执念已碎
执念已碎 2020-12-12 22:09

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:

         


        
14条回答
  •  天命终不由人
    2020-12-12 22:26

    If you are looking to compile all LESS files into a folder and subfolder tree in Windows. The following solution is using a batch file in Windows:

    File compile-less.bat: @echo
    cd ".\pages" for /r %%i in (*.less) do call lessc --clean-css "%%~i" "%%~dpni.min.css" cd ..

    EDITED: All the less file in the folder and subfolders will be compiled. Tested in Windows 10 and 8.1

提交回复
热议问题