mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
|
diff --git a/js-dgtable.cabal b/js-dgtable.cabal
|
||
|
index 37231b8..909c688 100644
|
||
|
--- a/js-dgtable.cabal
|
||
|
+++ b/js-dgtable.cabal
|
||
|
@@ -35,7 +35,8 @@ library
|
||
|
default-language: Haskell2010
|
||
|
hs-source-dirs: src
|
||
|
build-depends:
|
||
|
- base == 4.*
|
||
|
+ base == 4.*,
|
||
|
+ file-embed
|
||
|
|
||
|
exposed-modules:
|
||
|
Language.Javascript.DGTable
|
||
|
diff --git a/src/Language/Javascript/DGTable.hs b/src/Language/Javascript/DGTable.hs
|
||
|
index f299c34..446bb6f 100644
|
||
|
--- a/src/Language/Javascript/DGTable.hs
|
||
|
+++ b/src/Language/Javascript/DGTable.hs
|
||
|
@@ -1,4 +1,4 @@
|
||
|
-
|
||
|
+{-# LANGUAGE TemplateHaskell #-}
|
||
|
-- | Module for accessing minified jquery.dgtable code (<https://github.com/danielgindi/jquery.dgtable/>).
|
||
|
-- As an example:
|
||
|
--
|
||
|
@@ -24,17 +24,20 @@
|
||
|
-- > dgTableContents :: BS.ByteString
|
||
|
-- > dgTableContents = $(embedFile =<< runIO DGTable.file)
|
||
|
module Language.Javascript.DGTable(
|
||
|
- version, file
|
||
|
+ version, file, fileContent
|
||
|
) where
|
||
|
|
||
|
import qualified Paths_js_dgtable as Paths
|
||
|
import Data.Version
|
||
|
+import Data.FileEmbed
|
||
|
|
||
|
|
||
|
-- | A local file containing the minified jquery.dgtable code for 'version'.
|
||
|
file :: IO FilePath
|
||
|
file = Paths.getDataFileName "jquery.dgtable.min.js"
|
||
|
|
||
|
+fileContent = $(embedFile "javascript/jquery.dgtable.min.js")
|
||
|
+
|
||
|
-- | The version of jquery.dgtable provided by this package. Not necessarily the version of this package,
|
||
|
-- but the versions will match in the first three digits.
|
||
|
version :: Version
|