2014-04-21 14 views
1

好吧,所以我正在一個Wordpress主題,我正在用Grunt使用Sass。問題是,雖然在我的主要SCSS文件中有這樣一個響亮的評論,但壓縮輸出仍然不包括它。Sass壓縮輸出刪除響亮的評論

/*! 
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/

+0

你確定別的東西沒有剝離嗎?相關:http://stackoverflow.com/questions/4893215/using-sass-compressed-output-while-leaving-theme-comment-header-for-wordpress – cimmanon

+0

我不知道發生了什麼事,我應該在哪裏看,如果有東西別的是剝離它?在發佈這篇文章之前,我已經閱讀了您鏈接的問題以及其他許多內容,但我仍然不知道問題所在。我對Sass是新手,這是我第一次和Grunt一起工作,所以這可能是一些愚蠢的小事。另外,這裏是我作爲基礎工作的主題,以防萬一:https://github.com/olefredrik/foundationpress/ – Andrew

+0

當你自己輸入'grunt sass'時,生成的.css文件是什麼樣的? –

回答

1

正與!主題,你的多行註釋應該不管你的源文件(nested, expanded, compact or compressed)輸出風格的保留。因此,Sass編譯之外的東西必須剝離註釋 - 可能在Grunt彙編中的某處。