Since expand
is a part of Grunt, and not specific for grunt-contrib-copy, information about it can be found in Grunt’s file configuration API:
Set
expand
totrue
to enable the following options:
cwd
Allsrc
matches are relative to (but don’t include) this path.src
Pattern(s) to match, relative to thecwd
.dest
Destination path prefix.ext
Replace any existing extension with this value in generateddest
paths.extDot
Used to indicate where the period indicating the extension is located. Can take either'first'
(extension begins after the first period in the file name) or'last'
(extension begins after the last period), and is set by default to'first'
.flatten
Remove all path parts from generateddest
paths.rename
This function is called for each matchedsrc
file, (after extension renaming and flattening). Thedest
and matchedsrc
path are passed in, and this function must return a newdest
value. If the samedest
is returned more than once, eachsrc
which used it will be added to an array of sources for it.
Additionally it seems like dest
will always be considered to be a destination directory if setting expand
to true
.