Rename file based on regex in Gulp
问题 Say I have a LESS CSS directory structure like this: less/ core/ _main.less header.less body.less footer.less contact/ _main.less form.less details.less I want to write a Gulp task that will look for the _main.less files in each subdirectory of the less/ dir, pass this to gulp-less and write the output to the css/ dir like this: css/ core.css contact.css Because _main.less includes the other files in it's directory, only the _main.less files will have to be parsed, but I want the output file