Created
October 4, 2019 09:59
Sample Gruntfile.js for RTL support using package `grunt-rtlcss` from https://www.npmjs.com/package/grunt-rtlcss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function( grunt ) { | |
'use strict'; | |
// Project configuration | |
grunt.initConfig( { | |
rtlcss: { | |
options: { | |
// rtlcss options | |
config: { | |
preserveComments: true, | |
greedy: true | |
}, | |
// generate source maps | |
map: false | |
}, | |
dist: { | |
files: [{ | |
expand: true, | |
cwd: "assets/css/", | |
src: [ | |
'*.css', | |
'!*-rtl.css', | |
], | |
dest: "assets/css/", | |
ext: '-rtl.css' | |
}] | |
} | |
} | |
} ); | |
// Load task. | |
grunt.loadNpmTasks( 'grunt-rtlcss' ); | |
// Register task. | |
grunt.registerTask('rtl', ['rtlcss']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment