(SASS)如何排除我导入的文件以编译到css文件 [英] (SASS) How do I exclude my imported files to compile to css files

查看:70
本文介绍了(SASS)如何排除我导入的文件以编译到css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下sass目录

sass

config.rb
-base.scss
-mixins.scss
-main.scss 

site
  -dowmloads.scss
  -messages.scss
  ...
  ...






这工作正常,但我不想要所有的.scss文件编译为css文件。我只想输出main.css,因为它导入其他文件。
每当我做指南针看所有的CSS创建...
这是可能吗?


This works fine, however I don't want all my .scss files to compile to css files.I just want to output main.css because it imports the other files. Whenever I do compass watch all the css get created... Is this possible?

推荐答案

使用下划线启动文件名。然后你可以导入它,它的样式只会被添加到导入它的文件。实际的文件本身永远不会生成到自己的css文件中。

Start the filename with an underscore. You can then import this and it's styles will only get added to the file that imports it. The actual file itself will never get generated into it's own css file.

希望它有帮助。

这篇关于(SASS)如何排除我导入的文件以编译到css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆