Skip to content

Instantly share code, notes, and snippets.

@maheshwaghmare
Created October 4, 2019 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maheshwaghmare/0c6e1a1848420c5abbb45e03dfe3705c to your computer and use it in GitHub Desktop.
Save maheshwaghmare/0c6e1a1848420c5abbb45e03dfe3705c to your computer and use it in GitHub Desktop.
Sample Gruntfile.js for RTL support using package `grunt-rtlcss` from https://www.npmjs.com/package/grunt-rtlcss
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