Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/andrepolischuk/gulp-textr

Gulp plugin for Textr
https://github.com/andrepolischuk/gulp-textr

gulp gulp-plugin textr textr-plugins typography

Last synced: about 1 month ago
JSON representation

Gulp plugin for Textr

Awesome Lists containing this project

README

        

# gulp-textr [![Build Status][travis-image]][travis-url]

> Transform text with [Textr][textr]

## Install

```sh
npm install --save-dev gulp-textr
```

## Usage

```js
import gulp from 'gulp';
import textr from 'gulp-textr';
import quotes from 'typographic-quotes';
import ellipses from 'typographic-ellipses';
import spaces from 'typographic-single-spaces';

gulp.task('default', () => {
return gulp.src('src/text.md') // Hello "world"...
.pipe(textr(
[ spaces, quotes, ellipses ],
{ locale: 'en-us' }
))
.pipe(gulp.dest('dist')); // Hello “world”…
});
```

## API

### textr(plugins[, defaults])

Create new transform stream.

#### plugins

Type: `array`

Array of [plugins][textr-plugins] and transform functions.

#### defaults

Type: `object`

Default options (see `textr` [defaults][textr-defaults]).

## License

MIT

[travis-url]: https://travis-ci.org/andrepolischuk/gulp-textr
[travis-image]: https://travis-ci.org/andrepolischuk/gulp-textr.svg?branch=master

[textr]: https://github.com/A/textr
[textr-defaults]: https://github.com/A/textr#textrdefaults
[textr-plugins]: https://www.npmjs.com/browse/keyword/textr