在VS 2107中编译scss文件 [英] Compile scss files in VS 2107

查看:86
本文介绍了在VS 2107中编译scss文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用VS 2017 RC编辑和编译scss文件吗?


谢谢

解决方案

< blockquote>

您好markgoldin,


感谢您在MSDN论坛上发帖。


对于您的问题,我在我的VS 2017 RC上进行测试社区。最后找到scss文件可以编译。


先决条件:安装Web编译器

1.在Visual Studio中,按工具 - >扩展和更新。

2.搜索Web编译器(由Mads Kristensen创建)并安装。



3.需要重新启动Visual Studio。


编译文件:

1.右键单击解决方案资源管理器中的.scss文件以设置编译。

2.Press Web Compiler - >编译文件(Shift + Alt + Q)。


在项目的根目录中创建一个名为compilerconfig.json的文件,您可以在其中修改编译器的行为。右键单击compilerconfig.json文件,可以轻松运行所有已配置的编译器。



只要在Visual Studio中修改.scssfile,编译器就会自动运行以生成编译的输出文件。


在构建时编译:

1.右键单击compilerconfig.json文件

2.Press Web Compiler - >在构建时启用编译



3.单击菜单项将提示您将包含NuGet包安装到packages文件夹中的信息,而不向项目本身添加任何文件。 NuGet包中包含一个MSBuild任务,它将在
上运行与项目根目录中的compilerconfig.json文件完全相同的编译器。


最好的问候,



Is possible to edit and compile scss files using VS 2017 RC?

Thanks

解决方案

Hi markgoldin,

Thank you for posting in MSDN forum.

For your question, I test it on my VS 2017 RC Community. Finally find scss file could be compiled.

Prerequisite: Install Web Compiler
1.In Visual Studio, press Tools -> Extensions and updates.
2.Search for Web Compiler (created by Mads Kristensen) and install.

3.Restart of Visual Studio will be needed.

Compile files:
1.Right-click the .scss-file in Solution Explorer to setup compilation.
2.Press Web Compiler -> Compile File (Shift+Alt+Q).

A file called compilerconfig.json is created in the root of the project where you can modify the behavior of the compiler. Right-clicking the compilerconfig.json file let’s you easily run all the configured compilers.

Any time a .scssfile is modified within Visual Studio, the compiler runs automatically to produces the compiled output file.

Compile on Build:
1.Right-click the compilerconfig.json file
2.Press Web Compiler -> Enable compile on build

3.Clicking the menu item will prompt you with information that a NuGet package will be installed into the packages folder without adding any files to the project itself. The NuGet package contains an MSBuild task that will run the exact same compilers on the compilerconfig.json file in the root of the project.

Best Regards,


这篇关于在VS 2107中编译scss文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆