Process multiple files using globbing?
gregpettit opened this issue · 1 comments
I feel like the "options.recursive" might help me here, but there are no examples of its usage.
So, I have a directory full of HTML files that need includes. "one.html", "two.html", and "three.html" all contain the directive <!--build:include fragments/header.html--><!-- /build -->
for example. The way I can currently do this is with:
files:{
'dist/one.html':['src/html/one.html'],
'dist/two.html':['src/html/two.html'],
'dist/three.html':['src/html/three.html']
}
But it's less than ideal. Every time I add a new page, I need to expand my Gruntfile. Ideally, I would like to do something more like this, specifying a general output folder for all files and then specifying a source for the files :
files: {
'dist': ['src/html/*.html']
}
or
files: {
'dist': 'src/html/*.html'
}
But this gives me error because it recognizes the key is an existing directory, not a string for a filepath.
Am I just missing the technique in the documentation? Is it possible to do this?