5

I use the scaffolded site and whenever i change something in the static javascript files i have to stop the development server and do a 'cabal install && yesod devel' for the changes to take effect.

Is there a way to use the normal js/css instead of the cached versions so i don't need to recompile all the time?

somesoaccount
  • 1,267
  • 15
  • 37

2 Answers2

5

Try

touch Settings/StaticFiles.hs

It is that particular file because the template haskell code for static files is in that file (in the default scaffolded structure). Touching that file will recompile it and reexecute the template haskell code.


edit: Sorry, I noticed this doesn't answer your question regarding how to develop with the static js/css source files like you do with the files in the templates folder. Well, you should not have js/css files in your static folder, please consider moving your .js/.css files to the template folder and use the shakespearian languages if you feel you're actively working on the css and js files.

You only put the js/css files in the static folder when you've taken a large code base from somewhere else, like the blueprint css framework. See my answer on this question.

Community
  • 1
  • 1
Tarrasch
  • 10,199
  • 6
  • 41
  • 57
1

There's a wiki entry on this now - at least the part about not having to recompile your yesod project whenever there's a javascript change.

Bzzt
  • 1,064
  • 8
  • 13