Using dotless in enterprise projects

114 views
Skip to first unread message

jtom...@gmail.com

unread,
Apr 18, 2013, 3:11:18 PM4/18/13
to dot...@googlegroups.com
Hi,

I've been using dotless in several of my home projects and I really liked it. I introduced it to mycompany too, everyone likes it and they'd like to use it as well.
We currently don't know how we should handle the less and CSS files. Since css files are generated they shouldn't be checked in, only the less files, but what's the best practice to compile the less files on the build server?
Any1 has any experience with this?

And also, should we link the less or the css files in the cshtmls? When I link my less files the styles don't work on FF and IE :\


Thanks, 
Thomas

Daniel Hölbling

unread,
Apr 18, 2013, 3:43:42 PM4/18/13
to DotLess (Less Css for .NET)
The FF and IE problem must be a response header problem.. Maybe you could experiment a bit with the HttpHandler code to set the css response header so FF and IE correctly parse .less extensions as .css .. but I think that should be already working.

As for the best practices, if your app is not really big I'd just suggest using the HttpHandler in production too.
It uses the ASP.NET cache so the compilation should only take place once, and I don't think for a small to medium app the HttpHandler will add too much of an overhead.

Once you reach the point where you want to statically compile your CSS I'd do that as part of my deploy process. I haven't done anything like that in far too long so I hope someone else on the list can help you with that, but I suspect it will involve calling the console compiler .exe at some point :)

As for the Version Control: Never check in the resulting .css files.. Mostly because any change in the .css is not really meaningful to you as far as it's history is concerned, and you could also run into the problem that different versions of dotless could produce slightly different CSS for the same dotless file, making you log a change that's not really a change to VCS.


--
You received this message because you are subscribed to the Google Groups "DotLess (Less Css for .NET)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotless+u...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotless?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages