hsass 0.4.1 → 0.4.2
raw patch · 4 files changed
+42/−24 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.Sass.Options: SassStyleInspect :: SassOutputStyle
+ Text.Sass.Options: SassStyleToSass :: SassOutputStyle
+ Text.Sass.Options: defaultSassOptions :: SassOptions
+ Text.Sass.Values: SassSeparatorHash :: SassSeparator
Files
- CHANGELOG.md +6/−0
- Text/Sass/Options.hs +32/−20
- hsass.cabal +1/−1
- test/Text/Sass/ValuesSpec.hs +3/−3
CHANGELOG.md view
@@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.4.2] - 2017-08-28+### Added+- Introduce `defaultSassOptions` as default options (thanks @chris-martin !)+ ## [0.4.1] - 2017-03-19 ### Fixed - Bump `hlibsass` version to 0.1.5.2 (fixes build problem on Cabal 1.24 & Stack@@ -47,3 +51,5 @@ [0.2.0]: https://github.com/jakubfijalkowski/hsass/compare/v0.1.0...v0.2.0 [0.3.0]: https://github.com/jakubfijalkowski/hsass/compare/v0.2.0...v0.3.0 [0.4.0]: https://github.com/jakubfijalkowski/hsass/compare/v0.3.0...v0.4.0+[0.4.1]: https://github.com/jakubfijalkowski/hsass/compare/v0.4.0...v0.4.1+[0.4.2]: https://github.com/jakubfijalkowski/hsass/compare/v0.4.1...v0.4.2
Text/Sass/Options.hs view
@@ -2,6 +2,7 @@ module Text.Sass.Options ( SassOptions (..)+ , defaultSassOptions , Lib.SassOutputStyle (..) ) where @@ -55,24 +56,35 @@ , sassImporters :: Maybe [SassImporter] } +-- | The default 'SassOptions':+--+-- * 'sassPrecision' = 5+-- * 'sassOutputStyle' = 'Lib.SassStyleNested'+-- * 'sassIndent' = two spaces+-- * 'sassLinefeed' = @"\\n"@+-- * All other fields default to 'False' or 'Nothing'.+defaultSassOptions :: SassOptions+defaultSassOptions = SassOptions+ { sassPrecision = 5+ , sassOutputStyle = Lib.SassStyleNested+ , sassSourceComments = False+ , sassSourceMapEmbed = False+ , sassSourceMapContents = False+ , sassOmitSourceMapUrl = False+ , sassIsIndentedSyntax = False+ , sassIndent = " "+ , sassLinefeed = "\n"+ , sassInputPath = Nothing+ , sassOutputPath = Nothing+ , sassPluginPaths = Nothing+ , sassIncludePaths = Nothing+ , sassSourceMapFile = Nothing+ , sassSourceMapRoot = Nothing+ , sassFunctions = Nothing+ , sassHeaders = Nothing+ , sassImporters = Nothing+ }++-- | 'def' = 'defaultSassOptions' instance Default SassOptions where- def = SassOptions {- sassPrecision = 5- , sassOutputStyle = Lib.SassStyleNested- , sassSourceComments = False- , sassSourceMapEmbed = False- , sassSourceMapContents = False- , sassOmitSourceMapUrl = False- , sassIsIndentedSyntax = False- , sassIndent = " "- , sassLinefeed = "\n"- , sassInputPath = Nothing- , sassOutputPath = Nothing- , sassPluginPaths = Nothing- , sassIncludePaths = Nothing- , sassSourceMapFile = Nothing- , sassSourceMapRoot = Nothing- , sassFunctions = Nothing- , sassHeaders = Nothing- , sassImporters = Nothing- }+ def = defaultSassOptions
hsass.cabal view
@@ -1,5 +1,5 @@ name: hsass-version: 0.4.1+version: 0.4.2 license: MIT license-file: LICENSE author: Jakub Fijałkowski <fiolek94@gmail.com>
test/Text/Sass/ValuesSpec.hs view
@@ -60,9 +60,9 @@ "1px, 2px" it "should serialize map" $ do- let map = (SassMap [ (SassString "a", SassString "b")- , (SassNumber 1 "", SassBool True)])- let opts = optsWithVal map+ let sassMap = (SassMap [ (SassString "a", SassString "b")+ , (SassNumber 1 "", SassBool True)])+ let opts = optsWithVal sassMap result <- compileString "@each $key, $val in foo() { #{$key} { val: #{$val} } }" opts result `shouldBe` Right "a {\n val: b; }\n\n1 {\n val: true; }\n"