Grunt watch less files in dynamic path

170 Views Asked by At

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

There are 1 best solutions below

0
On

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.