SASS : making underscore file names actually create css files

最后都变了- 提交于 2019-11-26 14:49:07

问题


By default SASS looks at the filename and determines whether to make a css file out of it. I'm wondering if there is a way to prevent this from happening.

We're building a large website and lots of front-end developers are editing the css, but we only have one dev server. Sure some things you can see happen locally, but often you can only see the real rendered way on the server.

So, when I push my compiled css file to the server, my co-workers' css gets clobbered until s/he commits and I do an svn:update, etc, etc.

However, if we were working in different SASS file, and those css files were getting created, I would only have to push up, say, the forms.css file instead of the whole thing.

Then for Production, we'd put it back to the way SASS normally works.

The only other way I can figure to do this is to do a mass rename of files, which seem very messy.

Thanks in advance.


回答1:


The entire point of partials is that they don't get compiled into files. If you want a sass file to be turned into a css file, remove the underscore.

Your real problem seems the be that you're putting compiled CSS in your version control. Don't do that. Only commit Sass, and compile it into CSS server-side with a post-receive hook or something.



来源:https://stackoverflow.com/questions/16242546/sass-making-underscore-file-names-actually-create-css-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!