开发者

Is it possible to have Sass output a "DO NOT MODIFY" header?

开发者 https://www.devze.com 2023-04-03 02:32 出处:网络
Is it possible to have Sass output a \"DO NOT MODIFY\" message on the first line of each generated css file?

Is it possible to have Sass output a "DO NOT MODIFY" message on the first line of each generated css file?

A la Barista:

/* DO NOT MODIFY. This file was compiled Mon, 29 Aug 2011 17:08:0开发者_JS百科0 GMT from
* /var/www/test/app/coffeescripts/add_to_cart.coffee
*/


Says @chriseppstein:

Yep. Any comment that starts with /*! will never be stripped out even in compressed mode.

It also evaluates sass-script so in theory you can add dates, etc. but unless you know ruby that's not easy.

I've been meaning to build helper functions that would be useful in such a context: bit.ly/neASVa

0

精彩评论

暂无评论...
验证码 换一张
取 消