-1

Good day!

As I can configure grunt to monitor a dynamic path, I explain, I have a path (/module/[namemodule]/assets/*.less), in the namemodule part it changes, it can be anything (name) how can I have the assets folder of all the modules monitored ?, now, the destination will also change, it will not be in assets, it will be public (/module/[namemodule]/public/*.css), the truth is that it is the first time I use grunt and I'm lost


Thanks for replying, I have this in my gruntfile.js...

less: {
    developmen: {
        options: {
            compress: true,
            yuicompress: true,
            optimization: 2
        },
        files: {
            "/modules/**/public/*.css": "/modules/**/assets/*.less"
        }
    }
}

and even then you can not compile the file less, grunt returns the following message.

  • 1
    Possible duplicate of [Grunt compile all .less to .css in each directory](https://stackoverflow.com/questions/26106254/grunt-compile-all-less-to-css-in-each-directory) – jhpratt Sep 26 '17 at 16:48

1 Answers1

1

Please see Globbing Patterns.

Double splat ** should do what you need.

UPDATE Not a valid key value pair methinks

    files: {
        "/modules/**/public/*.css": "/modules/**/assets/*.less"
    }

Try using an absolute path for the first argument and see what happens.

Alan Larimer
  • 589
  • 8
  • 24