Web Essentials' RTLCSS tool does not work

江枫思渺然 提交于 2020-01-04 05:20:15

问题


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?


回答1:


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!



来源:https://stackoverflow.com/questions/29818720/web-essentials-rtlcss-tool-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!