防止SASS /指南针输出部分 [英] Prevent SASS/Compass From Outputting Partials
问题描述
我已成功使用Compass生成了CSS文件,但它也将我的局部输出到CSS目录。如何使其仅输出将在页面中使用的样式表?
I am successfully using Compass to generate a CSS file but it is also outputting my partials to the CSS directory. How can I make it only output the stylesheets that will be used in the page? There's no need to add the partials to the destination css directory.
推荐答案
从手册中:
如果您有要导入的SCSS或Sass文件,但又不想将
编译为CSS文件,则可以在其中添加下划线文件名的开头
。这将告诉Sass不要将其编译为普通的CSS
文件。然后,您可以在不使用下划线的情况下导入这些文件。
If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials
这篇关于防止SASS /指南针输出部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!