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).
- Host: GitHub
- URL: https://github.com/raiseandfall/slugify-files
- Owner: raiseandfall
- License: mit
- Created: 2015-02-23T17:56:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T12:43:30.000Z (almost 9 years ago)
- Last Synced: 2025-09-23T11:28:32.729Z (9 months ago)
- Topics: dashify, kebab-case, slug, urlify
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/slugify-files
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# slugify-files
[](https://travis-ci.org/raiseandfall/slugify-files) [](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