Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
meoblast001 committed Dec 17, 2018
2 parents 21fc322 + b9c08af commit 495060d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hakyll-sass.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: hakyll-sass
version: 0.2.3
version: 0.2.4
synopsis: Hakyll SASS compiler over hsass
license: MIT
license-file: LICENSE
Expand Down
9 changes: 6 additions & 3 deletions src/Hakyll/Web/Sass.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import Control.Monad (join)
import Data.Default.Class
import Hakyll.Core.Compiler
import Hakyll.Core.Identifier
import Hakyll.Core.Compiler.Internal
import Hakyll.Core.Item
import Hakyll.Core.Provider
import System.FilePath (takeExtension)
import Text.Sass.Compilation
import Text.Sass.Options
Expand Down Expand Up @@ -48,9 +50,10 @@ renderSass item =
-- | Compiles a SASS file item into CSS with options. The file extension will
-- not be used to determine SCSS from SASS formatting.
renderSassWith :: SassOptions -> Item String -> Compiler (Item String)
renderSassWith options item =
let filePath = toFilePath $ itemIdentifier item
in join $ unsafeCompiler $ do
renderSassWith options item = join $ do
provider <- compilerProvider <$> compilerAsk
let filePath = resourceFilePath provider (itemIdentifier item)
unsafeCompiler $ do
resultOrErr <- compileFile filePath options
case resultOrErr of
Left sassError -> errorMessage sassError >>= fail
Expand Down

0 comments on commit 495060d

Please sign in to comment.