heist-extra 0.1.0.0 → 0.2.0.0
raw patch · 5 files changed
+20/−10 lines, 5 filesdep +heistdep −heist-emanote
Dependencies added: heist
Dependencies removed: heist-emanote
Files
- CHANGELOG.md +9/−0
- README.md +5/−3
- heist-extra.cabal +5/−4
- src/Heist/Extra.hs +0/−1
- src/Heist/Extra/TemplateState.hs +1/−2
+ CHANGELOG.md view
@@ -0,0 +1,9 @@+# Revision history for heist-extra++## 0.2.0.0 (2022-11-14)++- Drop `heist-emanote`, and depend instead of the updated `heist` package.++## 0.1.0.0 (2022-09-24)++Initial release.
README.md view
@@ -1,5 +1,7 @@ # heist-extra +[](https://hackage.haskell.org/package/heist-extra)+ Extensions on top of [heist](https://srid.ca/heist-start), that are especially useful for [Ema](https://ema.srid.ca/) apps. ## Getting Started@@ -10,7 +12,7 @@ ## Examples -| Example | Use cases |-| ----------------------------------------- | ------------------------------------------ |+| Example | Use cases |+| ------------------------------------------ | ------------------------------------------ | | https://github.com/EmaApps/timedot-invoice | Template file management |-| https://github.com/EmaApps/emanote | Template file management; Pandoc rendering |+| https://github.com/EmaApps/emanote | Template file management; Pandoc rendering |
heist-extra.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: heist-extra-version: 0.1.0.0+version: 0.2.0.0 license: MIT copyright: 2022 Sridhar Ratnakumar maintainer: srid@srid.ca@@ -14,6 +14,7 @@ extra-source-files: LICENSE README.md+ CHANGELOG.md common shared ghc-options:@@ -68,14 +69,14 @@ ViewPatterns build-depends:- , base >=4.13.0.0 && <=4.18.0.0+ , base >=4.13.0.0 && <=4.18.0.0 , data-default , filepath- , heist-emanote >=1.2.1+ , heist >=1.1.1.0 , map-syntax , mtl , pandoc-types- , relude >=1.0+ , relude >=1.0 , xmlhtml hs-source-dirs: src
src/Heist/Extra.hs view
@@ -2,7 +2,6 @@ import Data.Text qualified as T import Heist qualified as H-import Heist.Common qualified as H import Heist.Internal.Types qualified as HT import Heist.Interpreted qualified as HI import Text.XmlHtml qualified as X
src/Heist/Extra/TemplateState.hs view
@@ -17,7 +17,6 @@ import Data.Text qualified as T import GHC.IO.Unsafe (unsafePerformIO) import Heist qualified as H-import Heist.Common qualified as H import Heist.Internal.Types qualified as HT import Heist.Interpreted qualified as HI import System.FilePath (splitExtension)@@ -77,7 +76,7 @@ removeTemplate :: HasCallStack => TemplateName -> TemplateState -> TemplateState removeTemplate name (TemplateState st errs) =- let tpath = H.splitPathWith '/' name+ let tpath = H.splitTemplatePath name newSt = st {HT._templateMap = HM.delete tpath (HT._templateMap st)} in TemplateState newSt (clearError name errs)