mimosa-rename

0.1.7 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i mimosa-rename

Weekly Downloads

0

Version

0.1.7

License

Apache2

Last publish

Collaborators

  • alxandr