Numbers Prefer Multiplication
    Wondering what’s next for npm?Check out our public roadmap! »

    slugify-files

    2.1.0 • Public • Published

    slugify-files

    Build Status

    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: glob
    • err: error
    • sluggedFiles: Array of slugged files objects. Each has two keys: old and new

    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

    Install

    npm i slugify-files

    DownloadsWeekly Downloads

    2

    Version

    2.1.0

    License

    MIT

    Last publish

    Collaborators

    • avatar