yesod-static-angular

Yesod generators for embedding AngularJs code into yesod-static at compile time

https://bitbucket.org/wuzzeb/yesod-static-angular

LTS Haskell 10.10:0.1.8
Stackage Nightly 2018-03-10:0.1.8
Latest on Hackage:0.1.8

See all snapshots yesod-static-angular appears in

MIT licensed and maintained by John Lenz
This version can be pinned in stack with:yesod-static-angular-0.1.8@sha256:365dc0069d929549906da0ba1e6d025e487d84b84a3bf9745a35022a9553fd6c,4432

Module documentation for 0.1.8

yesod-static supports generators which run at compile time which create static resources to embed directly into the executable. This package leverages these generators to provide automatic management of AngularJs code. During development individual files served and reloaded on every request. When compiling for production, the files are minimized, compressed, and then embedded into the executable.

There are several moving parts to integrating AngularJs into Yesod using this module

  • yesod-static-angular (this module) - embeds Angular code and directive templates into the static subsite
  • karma-ng-hamlet2js-preprocessor - a karma plugin to insert Hamlet directive templates into the AngularJs template cache.
  • webdriver - end to end web testing tool
  • webdriver-angular - some Angular specific commands for webdriver. This package contains all the functionality of protractor so protractor does not need to be used.
  • hspec-webdriver - some integration code to easily write hspec examples which are webdriver tests.

The example directory in the source code contains an example application that shows all of the above packages in action. Also, I have two blog posts describing the example and its tests.