Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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 absolute path of the output file.

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 the images/svgs directory.

About

Rename file in Mimosa

Resources

License

You can’t perform that action at this time.