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

Version on this page:0.1.7
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.7@sha256:a7cd8b1cc2d4e92b8af963041c4a98f6b6268d416db098d969bcac25d2a62086,4423

Module documentation for 0.1.7

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.