gulp-cssjanus
Gulp plugin that uses cssjanus to convert LTR CSS to RTL.
Install
$ npm install --save-dev gulp-cssjanus
Basic Usage
var gulp = ;var cssjanus = ; gulp;
API
cssjanus([options])
Convert CSS from LTR to RTL
options
swapLtrRtlInUrl
Type: boolean
Default: false
Swap 'ltr' and 'rtl' in URLs
swapLeftRightInUrl
Type: boolean
Default: false
Swap 'left' and 'right' in URLs
cssjanus
Type: module
Default: require('cssjanus')
Provide custom cssjanus module.
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 cssjanus.
var gulp = ;var autoprefixer = ;var cssjanus = ;var rename = ; gulp;
Alternatives
- gulp-rtlcss - based on rtlcss instead of cssjanus.
License
MIT © [Tom Tepez Yam]