Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndmitchell/js-dgtable
Haskell library to obtain minified jquery.dgtable code
https://github.com/ndmitchell/js-dgtable
Last synced: 25 days ago
JSON representation
Haskell library to obtain minified jquery.dgtable code
- Host: GitHub
- URL: https://github.com/ndmitchell/js-dgtable
- Owner: ndmitchell
- License: mit
- Created: 2019-03-15T14:08:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-15T13:20:06.000Z (about 1 year ago)
- Last Synced: 2024-05-08T20:20:21.118Z (6 months ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
# js-dgtable [![Hackage version](https://img.shields.io/hackage/v/js-dgtable.svg?label=Hackage)](https://hackage.haskell.org/package/js-dgtable) [![Stackage version](https://www.stackage.org/package/js-dgtable/badge/nightly?label=Stackage)](https://www.stackage.org/package/js-dgtable) [![Build status](https://img.shields.io/github/actions/workflow/status/ndmitchell/js-dgtable/ci.yml?branch=master)](https://github.com/ndmitchell/js-dgtable/actions)
This package bundles the minified [jquery.dgtable](https://github.com/danielgindi/jquery.dgtable) code into a Haskell package,
so it can be depended upon by Cabal packages. The first three components of
the version number match the upstream jQuery version. The package is designed
to meet the redistribution requirements of downstream users (e.g. Debian).
As an example:```haskell
import qualified Language.Javascript.DGTable as DGTablemain = do
putStrLn $ "jquery.dgtable version " ++ show DGTable.version ++ " source:"
putStrLn =<< readFile =<< DGTable.file
```This package installs data files containing the jquery.dgtable sources, which must be available at runtime. If you want to produce an executable with no dependency on associated data files, you can use the [`file-embed`](https://hackage.haskell.org/package/file-embed) library:
```haskell
{-# LANGUAGE TemplateHaskell #-}import Data.FileEmbed
import qualified Data.ByteString as BS
import qualified Language.Javascript.DGTable as DGTable
import Language.Haskell.TH.Syntaxmain = print dgTableContents
dgTableContents :: BS.ByteString
dgTableContents = $(embedFile =<< runIO DGTable.file)
```