An open API service indexing awesome lists of open source software.

https://github.com/raiseandfall/slugify-files

A simple CL tool to slugify your files (kebab case).
https://github.com/raiseandfall/slugify-files

dashify kebab-case slug urlify

Last synced: 8 months ago
JSON representation

A simple CL tool to slugify your files (kebab case).

Awesome Lists containing this project

README

          

# slugify-files

[![Build Status](https://travis-ci.org/raiseandfall/slugify-files.svg)](https://travis-ci.org/raiseandfall/slugify-files) [![Downloads](https://img.shields.io/npm/dt/slugify-files.svg)](https://www.npmjs.com/package/slugify-files)

> A simple CL tool to slugify files (kebab-case)

> ```"this Filename NEEDS cleaning.png" -> "this-filename-needs-cleaning.png"```

## [CHANGELOG](./CHANGELOG.md)

## INSTALL

```shell
$ npm install slugify-files
```

## USAGE

```javascript
var slugify = require('slugify-files');

slugify(['*.png'], function (err, sluggedFiles) {
sluggedFiles.forEach(function(file, idx)) {
console.log(file.old, 'renamed to', file.new);
}
});
```

## CLI

```shell
$ npm install --global slugify-files
```

```
$ slugify --help

Usage
$ slugify

Example
$ slugify '*.tmp'

can contain globs if quoted
```

## API

```javascript
slugify(source, function(err, sluggedFiles){});
```
- ```source```: glob
- ```err```: error
- ```sluggedFiles```: Array of slugged files objects. Each has two keys: ```old``` and ```new```

## CONTRIBUTE

```shell
$ git clone git@github.com:raiseandfall/slugify-files.git && cd slugify-files
```

```shell
$ npm i
```

Run
```shell
$ npm run dev
```

Run tests
```shell
$ npm run test
```

## LICENSE
MIT