Skip to content

Commit

Permalink
#2 LibSassProxy switched to LibSassHost
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantin committed Sep 22, 2017
1 parent ab6ab0c commit 447b6b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using DotLiquid.Exceptions;
using DotLiquid.FileSystems;
using DotLiquid.ViewEngine.Exceptions;
using LibSassHost;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Configuration;
Expand Down Expand Up @@ -46,8 +47,7 @@ public class ShopifyLiquidThemeEngine : IFileSystem, ILiquidThemeEngine
private readonly IWorkContextAccessor _workContextAccessor;
private readonly IStorefrontUrlBuilder _storeFrontUrlBuilder;
private readonly ICacheManager<object> _cache;
//TODO:
//private readonly SassCompilerProxy _saasCompiler = new SassCompilerProxy();

private readonly IThemesContentBlobProvider _themeBlobProvider;
public ShopifyLiquidThemeEngine(ICacheManager<object> cache, IWorkContextAccessor workContextAccessor,
IStorefrontUrlBuilder storeFrontUrlBuilder, IThemesContentBlobProvider themeBlobProvider, IOptions<LiquidThemeEngineOptions> options)
Expand Down Expand Up @@ -182,7 +182,9 @@ public Stream GetAssetStream(string filePath)
try
{
//handle scss resources
//content = _saasCompiler.Compile(content);
CompilationResult result = SassCompiler.Compile(content);
content = result.CompiledContent;

retVal = new MemoryStream(Encoding.UTF8.GetBytes(content));
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

<ItemGroup>
<PackageReference Include="DotLiquid.VirtoCommerce" Version="1.8.3" />
<PackageReference Include="LibSassHost" Version="1.0.4" />
<PackageReference Include="LibSassHost.Native.win-x64" Version="1.0.4" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="PagedList.Core" Version="1.17.4" />
</ItemGroup>
Expand Down

0 comments on commit 447b6b8

Please sign in to comment.