mimosa-rename
v0.1.7
Published
Rename mimosa files
Downloads
2
Readme
mimosa-rename
This Mimosa module will rename files before they are written.
For more information regarding Mimosa, see http://mimosa.io
Usage
Add 'rename'
to your list of modules.
Default Config
rename: {
map: []
}
map
array of arrays
Each mapping array contains two elements: a regex to match a file name, and the regex replace string/function. The regex is matched against the output name of the file relative to the root of the project.
Example Config
rename: {
map: [
[/public\/javascripts\/foo.js/, "public/javascripts/bar.js"],
[/public\/svgs\/([A-Za-z0-9-_]+).svg/, "public/images/svgs/$1.svg"]
]
}
- The first entry in the
map
above does a simple full name replace. - The second entry moves all your
svgs/*.svg
to theimages/svgs
directory.