packages feed

happstack-jmacro (empty) → 6.0.0

raw patch · 4 files changed

+73/−0 lines, 4 filesdep +basedep +bytestringdep +happstack-serversetup-changed

Dependencies added: base, bytestring, happstack-server, jmacro, utf8-string

Files

+ Happstack/Server/JMacro.hs view
@@ -0,0 +1,17 @@+-- |This modules provides support for using JMacro with Happstack.+--+-- It provides the instance,+--+-- > instance ToMessage JStat +--+-- Which will serve a 'JStat' value as @text/javascript; charset=UTF-8@.+module Happstack.Server.JMacro where++import qualified Data.ByteString.Char8 as S+import Data.ByteString.Lazy.UTF8       as LB+import Happstack.Server                (ToMessage(..))+import Language.Javascript.JMacro      (JStat(..), renderJs)+    +instance ToMessage JStat where+    toContentType _  = S.pack "text/javascript; charset=UTF-8"+    toMessage     js = LB.fromString (show $ renderJs js)
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Jeremy Shaw 2011++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Jeremy Shaw nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+import Distribution.Simple+main = defaultMain
+ happstack-jmacro.cabal view
@@ -0,0 +1,23 @@+Name:                happstack-jmacro+Version:             6.0.0+Synopsis:            Support for using JMacro with Happstack+Homepage:            http://www.happstack.com/+License:             BSD3+License-file:        LICENSE+Author:              Jeremy Shaw+Maintainer:          jeremy@n-heptane.com+-- Copyright:           +Stability:           Provisional+Category:            Web+Build-type:          Simple+Cabal-version:       >=1.2+++Library+  Exposed-modules:     Happstack.Server.JMacro+  Build-depends:+     base >4 && <5,+     bytestring,+     jmacro,+     happstack-server,+     utf8-string