开发者

How to include SASS files and CSS files into version repository and developement cycle

I have a project that uses Subversion as versioning tool and a remote host for deploy working 开发者_JAVA技巧code (live stage is smth different). I use sass files to generate css files. My question is: where and when should I generate files?

Some opinions: 1. I think it is not OK to put css files into repository 2. I need css files when testing working copy so I can't wait compilation until deploy


We choose to version both the sass files, as well as the compiled css files. That way, everyone has access to the latest version of everything when they pull down locally. We build, test and compile locally. Then merge locally. And once it's in good standing, then we push out to a test server (identical to production server).

There is no compilation on the servers. Compiling locally ensures that only valid code gets out to the test server.

Merging locally is made easier because each of us can use our merge tool(s) of choice.

Also, we are able to track histories, and it makes refactoring easier to have both sets of files in the repo.

Finally, The CMSes that we use have modules that combine and minify all the css files into one, and same thing for the js files. We have granular control of the minification process, so we can load them one at a time for debugging on the test server. And turn-off debugging when we want to test production settings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜