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

后端 未结 14 605
执念已碎
执念已碎 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:22

    Just found an awesome npm module to do that ! :)

    Install it:

    $ npm install [-g] lessc-each
    

    Run it:

    $ lessc-each  ‹dir1›  ‹dir2›
    

    Where ‹dir1› is the directory of Less files to compile, and ‹dir2› is the directory for output files. If ‹dir2› does not exist, it will automatically be created. Both directories must be relative to the current path of the command line.

提交回复
热议问题