# gulp-rtlcss

> Gulp plugin that uses RTLCSS to convert LTR CSS to RTL.

Latest version **2.0.0** (published 2022-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-rtlcss
pnpm add gulp-rtlcss
yarn add gulp-rtlcss
bun add gulp-rtlcss
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-04-01 |
| First published | 2014-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | James Harrison |
| Maintainers | jjlharrison |
| Keywords | convert, css, gulpplugin, rtl |

## Links

- npm: https://www.npmjs.com/package/gulp-rtlcss
- Repository: https://github.com/jjlharrison/gulp-rtlcss
- Homepage: https://github.com/jjlharrison/gulp-rtlcss#readme
- Issues: https://github.com/jjlharrison/gulp-rtlcss/issues
- npm.io page: https://npm.io/package/gulp-rtlcss

## Dependencies (4)

- [rtlcss](https://npm.io/package/rtlcss.md) ^3.5.0
- [through2](https://npm.io/package/through2.md) ^2.0.5
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1
- [vinyl-sourcemaps-apply](https://npm.io/package/vinyl-sourcemaps-apply.md) ^0.2.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-04-01
- 0.1.1 (true) — 2014-12-21
- 1.4.2 — 2021-05-13
- 1.4.1 — 2020-03-10
- 1.4.0 — 2019-06-18
- 1.3.0 — 2018-09-17
- 1.2.0 — 2018-03-17
- 1.1.0 — 2018-01-10
- 1.0.0 — 2016-02-18
- 0.1.4 — 2015-01-28
- 0.1.3 — 2015-01-28
- 0.1.2 — 2014-12-21
- 0.1.0 — 2014-12-21

## README

# gulp-rtlcss

[![MIT Licence][licence-image]][licence-url] [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][david-dm-image]][david-dm-url] [![Language grade: JavaScript][lgtm-grade-image]][lgtm-url]

[Gulp](http://gulpjs.com) plugin that uses [RTLCSS](https://github.com/MohammadYounes/rtlcss) to convert LTR CSS to RTL.

## Install

```bash
$ npm install --save-dev gulp-rtlcss
```

## Basic Usage

```js
var gulp = require('gulp');
var rtlcss = require('gulp-rtlcss');

gulp.task('default', function () {
	return gulp.src('styles.css')
		.pipe(rtlcss())
		.pipe(gulp.dest('dist'));
});
```
## Configuration

The plugin optionally accepts RTLCSS configuration either as an argument or with a file named `.rtlcssrc` or `.rtlcssrc.json`.

See the [RTLCSS documentation](https://github.com/MohammadYounes/rtlcss) for more information about accepted configuration.

## Example

The below example will result in 2 copies of each stylesheet, one LTR stylesheet and one RTL stylesheet (with "-rtl" appended to the filename before the extension). The example uses autoprefixer, this is just an example of other CSS post-processing being used before rtlcss.

```js
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
var rtlcss = require('gulp-rtlcss');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('styles', function () {
    return gulp.src(['/styles/*.css'])
		.pipe(sourcemaps.init())
        .pipe(autoprefixer(["last 2 versions", "> 1%"])) // Other post-processing.
        .pipe(gulp.dest('dist')) // Output LTR stylesheets.
        .pipe(rtlcss()) // Convert to RTL.
        .pipe(rename({ suffix: '-rtl' })) // Append "-rtl" to the filename.
		.pipe(sourcemaps.write('dist')) // Output source maps.
        .pipe(gulp.dest('dist')); // Output RTL stylesheets.
});
```
## Change Log

See [CHANGELOG.md](CHANGELOG.md).

[david-dm-image]: http://img.shields.io/david/jjlharrison/gulp-rtlcss.svg?style=flat
[david-dm-url]: https://david-dm.org/jjlharrison/gulp-rtlcss
[npm-image]: http://img.shields.io/npm/v/gulp-rtlcss.svg?style=flat
[npm-url]: https://www.npmjs.org/package/gulp-rtlcss
[travis-image]: http://img.shields.io/travis/jjlharrison/gulp-rtlcss.svg?style=flat
[travis-url]: https://travis-ci.org/jjlharrison/gulp-rtlcss
[licence-image]: http://img.shields.io/npm/l/gulp-rtlcss.svg?style=flat
[licence-url]: https://tldrlegal.com/license/mit-license
[lgtm-grade-image]: https://img.shields.io/lgtm/grade/javascript/g/jjlharrison/gulp-rtlcss.svg?logo=lgtm&logoWidth=18
[lgtm-url]: https://lgtm.com/projects/g/jjlharrison/gulp-rtlcss/context:javascript

---
_Source: https://npm.io/package/gulp-rtlcss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
