Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kflorence/gulp-pretty-url

Simple gulp-rename wrapper to generate pretty URLs
https://github.com/kflorence/gulp-pretty-url

Last synced: 7 days ago
JSON representation

Simple gulp-rename wrapper to generate pretty URLs

Awesome Lists containing this project

README

        

# gulp-pretty-url

A simple [https://github.com/hparra/gulp-rename](gulp-rename) wrapper to generate pretty URLs.

## Install

`npm install gulp-pretty-url --save-dev`

## Example

```javascript
var gulp = require("gulp");
var prettyUrl = require("gulp-pretty-url");

gulp.task("pretty-urls", function() {
return gulp.src("src/**/*.hbs")
.pipe(prettyUrl())
.pipe(gulp.dest("dest"))
});
```

Given the following file structure:

```
.
├── index.hbs
├── qux.hbs
└── foo
├── bar.hbs
└── baz.hbs
```

The result would be:

```
.
├── index.html
├── qux
│ ├── index.html
└── foo
├── bar
│ └── index.html
└── baz
└── index.html
```

## License

MIT