Question

I have a LESS file (test.less) with the following class:

.bad_class {
   color: #fff
}

I linting and compiling my files with the grunt-recess plugin.

My Grunt options for recess are:

recess: {
    options: {
        noUnderscores: true
    },
    test: {
        files: {
            'assets/css/test.css': [
                'assets/less/test.less'
            ]
        }
    }
}

When I run recess, it doesn't fail.

I tried without setting the noUnderscores option at all - didn't work.

I even tried setting noUnderscores: false, but that didn't work.

What's am I doing wrong?

Was it helpful?

Solution

Try this

   recess: {
        build:  {
            src: [ 'assets/less/test.less' ],
            dest: 'assets/css/test.css',
            options: {
                compile: true,
                compress: true,
                noUnderscores: false,
                noIDs: false,
                zeroUnits: false
            }
        }
    }

If above is not working try the below code

recess: {
        build:  {
            src: [ 'assets/less/test.less' ],
            dest: 'assets/css/test.css',
            options: {                    
                compress: false,
                noUnderscores: false,
                noIDs: false,
                zeroUnits: false
            }
        },
       compliefile:{
          src: [ 'assets/less/test.less' ],               
          dest: 'assets/css/test.css',
          options: {
                    compile: true
                   }
           }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top