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

178 Views Asked by At

I'm trying to compress a bunch of less files using Grunt with the plugin grunt-contrib-less using the option:

compress: true

But when I run the Grunt task it removes the banner that is actually a comment.

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

As you can notice I'm trying to develope a WordPress theme and it's necessary to have this comment on the top of my style.css in order to keep it working.

Do you know a workaround to solve this problem?

Thanks!

1

There are 1 best solutions below

1
On

Try starting with banner:'/*! - I know that works with CSS comments.