簡體   English   中英

如何使用grunt-contrib-less進行壓縮而不丟失標語文字?

[英]How to compress with grunt-contrib-less without losing the banner text?

我正在嘗試使用帶有選項grunt-contrib-less的Grunt壓縮少量文件:

compress: true

但是,當我運行Grunt任務時,它會刪除實際上是評論的標語。

 banner:'/*\nTheme Name: maugelves.com \n' +
        'Theme URI: http://maugelves.com\n' +
        'Description: MauGelves.com Theme\n' +
        'Version: 1.0.0\n' +
        'Author: Mauricio Gelves (@maugelves)\n' +
        'License: MIT\n*/'

如您所見,我正在嘗試開發WordPress主題,因此有必要在style.css頂部添加此注釋,以使其正常運行。

您知道解決此問題的解決方法嗎?

謝謝!

嘗試以banner:'/*!開頭banner:'/*! -我知道這適用於CSS注釋。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM