less编译css
Last week I showed you how you can easily . The process of creating LESS files is simple, as is compilation of said files, but I was frequently forgetting to compile the .less files before checking the style changes in the browser. When I did have the sense to compile, I found myself completely annoyed at having to run the same command over and over. Enter : a Mac app which allows you to add folders containing .less files and automatically compiles them when a file is saved!
上周,我向您展示了如何轻松 。 创建LESS文件的过程很简单,就像编译所述文件一样,但是我经常忘记在浏览器中检查样式更改之前编译.less文件。 当我确实有编译意识时,我发现自己不得不一次又一次地运行相同的命令而感到烦恼。 输入 :一个Mac应用程序,它允许您添加包含.less文件的文件夹,并在保存文件时自动编译它们!
After downloading and opening the app, the first step is dragging the "davidwalsh" theme directory into the app's left drawer:
下载并打开应用程序后,第一步是将“ davidwalsh”主题目录拖到应用程序的左侧抽屉中:
LESS.app will scan the directly and list each .less file. You can click the checkbox to the right of the file to instruct Less.app to minify the CSS output, which is especially helpful when getting your CSS ready for production.
LESS.app将直接扫描并列出每个.less文件。 您可以单击文件右边的复选框,以指示Less.app缩小CSS输出,这在使CSS投入生产时特别有用。
Once all of the .less files you want compiled appear within the list, switch to the Compiler tab and click the "Compile All" button:
一旦要编译的所有.less文件出现在列表中,请切换到“编译器”选项卡,然后单击“全部编译”按钮:
LESS.app will then compile each desired .less file into a working .css file, minified if you had so chosen. The compiler will spit back a success or failure message at the end of each compilation. One last feature I will point out is the "Automatically compile files when saved" feature, which compiles your .less files when any of them is saved. This awesome feature is great for people like myself who frequently change and refresh.
然后,LESS.app将把每个所需的.less文件编译成一个有效的.css文件,如果您选择了此文件,则将其缩小。 编译器将在每次编译结束时回显成功或失败消息。 我要指出的最后一个功能是“保存时自动编译文件”功能,该功能可以在保存任何.less文件时对其进行编译。 这项很棒的功能非常适合像我这样经常更换和刷新的人。
If you're frequently working with LESS CSS, you really must get LESS.app. The "compile when saved" and CSS minification features make LESS.app a huge time-saving utility.
如果您经常使用LESS CSS,则实际上必须获得LESS.app。 “保存时编译”和CSS最小化功能使LESS.app成为节省大量时间的实用程序。
翻译自:
less编译css