Soumya Gangamwar
Soumya Gangamwar

Reputation: 1022

How to create multiple minified css files for multiple less files using grunt?

I have 5 less files. I want to convert this 5 less files into 5 diffrent css minified files using grunt .

https://scotch.io/tutorials/a-simple-guide-to-getting-started-with-grunt

By this tutorial I get to know that the converting multiple less files to single css file. But I want convert multiple to multiple

less: {
  build: {
    files: {
      'Aline-production/css/pretty.css': 'Aline-dev/css/*.less'
    }
  }
}

Is there any way. Please any one can help me to do that

Upvotes: 0

Views: 203

Answers (1)

Mike Mellor
Mike Mellor

Reputation: 1346

I use grunt-sass but i imagine the following should work.

less: {
  build: {
    files: [
        {
            expand: true,
            cwd: 'Aline-dev/css/',
            src: ['*.less'],
            dest: 'Aline-production/css/',
            ext: '.css'
        }
    ]
  }
}

Upvotes: 1

Related Questions