Sass压缩输出消除了大声评论

时间:2014-04-21 15:10:08

标签: sass gruntjs

好的,所以我正在研究一个Wordpress主题,而我正在使用Sass和Grunt。问题是虽然在我的主要SCSS文件中我有这样的响亮的评论,但压缩输出仍然不包括它。

/*!
Theme Name:         Theme Name
Theme URI:          http://theme.com
Description:        Theme Description.
Version:            1.0.0
Author:             Me
Author URI:         http://me.com
*/

/* Global config */
@import "config/variables"; // Your custom variables
@import "config/colors"; // Your custom color scheme
@import "config/settings"; // Default settings file. Uncomment each setting you need to change

/* Foundation 5 */
@import "foundation"; // Foundation 5 by Zurb

/* Site structure */
@import "site/structure"; // Your site structure

我已经尝试将outputStyle更改为嵌套在Gruntfile中,并且注释以这种方式显示,但显然我不希望在实时网站上执行此操作。知道是什么导致了这个吗?

编辑:这是我正在使用https://github.com/olefredrik/foundationpress/

的主题

1 个答案:

答案 0 :(得分:1)

使用!,无论您要编译为(nested, expanded, compact or compressed)的输出样式,都应保留多行注释。因此,Sass编译之外的东西必须剥离注释 - 可能是Grunt编译中的某个地方。

相关问题