简体   繁体   English

Codekit,LESS CSS,要上传哪些文件?

[英]Codekit, LESS CSS, Which files to upload?

So I'm using Codekit to compile LESS CSS on my local server. 所以我使用Codekit在本地服务器上编译LESS CSS。 Now I need to transfer the files to my live server. 现在我需要将文件传输到我的实时服务器。

My question is, do I need to upload all the .less files? 我的问题是,我是否需要上传所有.less文件? Or can I just upload the minified css file? 或者我可以上传缩小的CSS文件吗?

What is the best practice here? 这里的最佳做法是什么?

If you don't plan on editing anything on your live server (which you shouldn't anyway), you only need to upload the compiled .css file; 如果你不打算在你的实时服务器上编辑任何东西(你不应该这样做),你只需要上传已编译的.css文件; the compiled CSS is completely independent of the source LESS. 编译后的CSS完全独立于源LESS。

It is better to upload CSS files. 最好上传CSS文件。

Firstly, LESS might not be compatible for all browsers and secondly, CSS is your output of LESS file will take up some time(minimal but why to force on client) to compile it on run time. 首先,LESS可能与所有浏览器不兼容,其次,CSS是LESS文件的输出将花费一些时间(最小但为什么强制客户端)在运行时编译它。

I am deploying files to a server from more than one machine, so I tend to upload (in my case) scss files (although less files are essentially similar) and then I can pull them down to a separate machine for editing. 我正在从多台机器上将文件部署到服务器,因此我倾向于上传(在我的情况下)scss文件(尽管较少的文件基本相似)然后我可以将它们下载到一台单独的机器进行编辑。 But the pages only refer to the css files. 但页面只引用css文件。

As a minimum you only need to upload the compiled css file(s). 至少您只需要上传已编译的css文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM