snaplet-coffee alternatives and similar packages
Based on the "snaplet" category.
Alternatively, view snaplet-coffee alternatives based on common mentions on social networks and blogs.
-
snaplet-postgresql-simple
postgresql-simple snaplet for the Snap Framework -
snaplet-persistent
Snaplet for using Persistent in snap applications -
snaplet-acid-state
acid-state snaplet for Snap Framework -
snaplet-actionlog
Create a change log/history for records in your snap application -
snaplet-sqlite-simple
sqlite-simple snaplet for the Snap Framework -
snaplet-mysql-simple
A haskell snaplet for using MariaDB and MySQL database with a Snap Framework application via mysql-simple -
snaplet-sass
Sass integration for Snap with request- and pre-compilation. -
snaplet-postmark
Haskell Snap Framework support for Postmark email system. -
snaplet-auth-acid
An AcidState backend for Snap's Auth Snaplet -
snaplet-haxl
Snaplet for Haxl: https://github.com/facebook/Haxl
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of snaplet-coffee or a related project?
README
Snaplet Coffee
Snaplet Coffee is a snaplet for the Haskell web framework Snap. It will let you easily use CoffeeScript in your Snap web applications.
This snaplet is based off of the Snaplet-Fay And I've made it so that they basically work the same way.
Example Usage
Practically copied from Snaplet-Fay
Site.hs:
import Snap.Snaplet.Coffee
routes = [..., ("/coffee", with coffee coffeeServe)]
app :: SnapletInit App App
app = makeSnaplet "app" "A snaplet example application." Nothing $ do
coffee' <- nestSnaplet "coffee" coffee initCoffee
return $ App { _coffee = coffee' }
Application.hs:
import Snap.Snaplet.Coffee
data App = App { _coffee :: Snaplet CoffeeScript }
makeLenses ''App
Run your application now.
A snaplet config file will be generated at snaplets/coffee/devel.cfg the first time your application initializes the snaplet. The defaults are the recommended ones for development.
Place your CoffeeScript .coffee files in snaplets/coffee/coffee. Note that a default devel.cfg will not be created if you have already created the coffee directory. If this happens to you, move snaplets/coffee, start your application, and then move the files back into snaplets/coffee.
Any requests to the specified directory (in this case /coffee/) will compile the appropriate CoffeeScript file and serve it.