README
slugify-files
A simple CL tool to slugify files (kebab-case)
"this Filename NEEDS cleaning.png" -> "this-filename-needs-cleaning.png"
CHANGELOG
INSTALL
$ npm install slugify-files
USAGE
var slugify = require('slugify-files');
slugify(['*.png'], function (err, sluggedFiles) {
sluggedFiles.forEach(function(file, idx)) {
console.log(file.old, 'renamed to', file.new);
}
});
CLI
$ npm install --global slugify-files
$ slugify --help
Usage
$ slugify <source>
Example
$ slugify '*.tmp'
<source> can contain globs if quoted
API
slugify(source, function(err, sluggedFiles){});
source
: globerr
: errorsluggedFiles
: Array of slugged files objects. Each has two keys:old
andnew
CONTRIBUTE
$ git clone git@github.com:raiseandfall/slugify-files.git && cd slugify-files
$ npm i
Run
$ npm run dev
Run tests
$ npm run test
LICENSE
MIT