简体   繁体   English

将SCSS文件捆绑到CSS中

[英]Bundling SCSS files into CSS

I am trying to Integrate scss file in Asp.Net with the Bundle method: 我正在尝试使用Bundle方法集成Asp.Net中的scss文件:

public static void RegisterBundles(BundleCollection bundles) {
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));

bundles.Add(new ScriptBundle("~/bundles/modernizr").Include("~/Scripts/modernizr-*"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/css/bootstrap.css","~/Content/css/Site.css"));

var sassBundle = new Bundle("~/content/style-bundle").Include(
"~/content/css/style.scss" );
sassBundle.Transforms.Add(new BundleTransformer.Core.Transformers.CssTransformer());
sassBundle.Transforms.Add(new CssMinify());
sassBundle.Orderer = new BundleTransformer.Core.Orderers.NullOrderer();
bundles.Add(sassBundle);
 }
}

I get the following Error: 我收到以下错误:

An exception of type 'BundleTransformer.Core.Translators.AssetTranslationException' occurred in BundleTransformer.SassAndScss.dll but was not handled in user code

Additional information: During translation of SCSS-code, readed from the file '/content/css/style.scss', to CSS-code syntax error has occurred. 附加信息:在从文件'/content/css/style.scss'读取的SCSS代码转换为CSS代码语法时,发生了错误。

See more details: 查看更多详细信息:

Message: Undefined mixin 'box-shadow'.

File: /content/css/covve/_colours.scss

Line number: 56

I have already download all the Sass lib.Can anyone help me i'm a newbie on sass files. 我已经下载了所有的Sass lib。有人可以帮我吗,我是sass文件的新手。 Thank you in advance! 先感谢您!

确保包含该文件box-shadow混入已导入要处理的描述文件在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM