flatten-dirname
Flatten files to from relative folders. But keep dirname on filename.
Installation
npm install flatten-dirname --save
Usage
fdname(glob,dest,options,callback)
Example
var fdname = ; ; // this// heroes/lulu/hit/001.png// heroes/lulu/hit/002.png// heroes/janna/walk/001.png // return// destFolder/heroes_$_lulu_$_hit_$_001.png// destFolder/heroes_$_lulu_$_hit_$_002.png// destFolder/heroes_$_janna_$_walk_$_001.png // or; // with all options;
Options
Option | Description | Default |
split |
Split string. | _$_ |
CLI
npm install flatten-dirname -g
Usage
$ fdname <glob> <dest>
Options
--split Split string. Default: "_$_"
Examples
fdname "**/*.png"
fdname "**/*.png" destFolder/
fdname "**/*.png" "destFolder/" --split "@"
Check Also
License
MIT