Search code examples
htmlcssvisual-studioright-to-leftweb-essentials

Web Essentials' RTLCSS tool does not work


I am using Web Essentials extension with Visual Studio 2013.

I want to use Web Essentials' CSS RTL tool. But when I run that tool on my CSS files nothing happens.

Web Essentials don't generate any RTL file. I've discovered when a css file have css.map file, Web Essentials could generate RTL file also.

How can I generate RTL files for every CSS files?


Solution

  • The issue is related to the latest web essentials package (v2.5) having an updated postcss version that enables inline source maps by default.

    If you can't compile this branch and use the generated package, do the following:

    1. Close Visual Studio.

    2. Go to C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\{webessentials}\Resources\nodejs\tools\server\services

      where {username} is your username and {webessentials} is a random generated folder name containing web essentials files.

    3. Open srv-rtlcss.js search for map = result.map.toJSON(); and replace it with:

      if (typeof result.map !== 'undefined'){
        map = result.map.toJSON();
      }
      
    4. Save the file, Open Visual Studio and Run RTLCSS.

    Let me know if you need further assistance!