Goal
My goal is to to get Twitter Bootstrap to worth with my Play 2.x scala project. Because i can't get it to wrok i decided to start an empty project to see if i can get the hang of 'less'. Now thats where i'm stuck, as i can't seem to get 'less' to compile/do anything!
Simple reproduction in an empty project
- Downloaded http://www.playframework.org/download play-2.0.2-RC2.zip and extracted that to my debian linux box. (Why play-2.0.2-RC2? Because the 'less' version in there is compatible with the latest twitter bootstrap as mentioned here.)
- Created a new play project
play new zzz
(zzz=name of the test project). - Went to
zzz/public/stylesheets
and added a file namedq.less
(its content is the first example on this page http://lesscss.org/, simple variable name usage). - Because i'm testing a lot i each time type:
play clean-all
in the commandline before each new test/Build.scala/etc file change. - Started
play
and typed:reload
(don't really know why)compile
(as per: http://www.playframework.org/documentation/2.0.1/AssetsLess)- (*) See below
- i ctrl+d'ed out of play and typed:
find . -name *.css
and it doesn't show me my 'q.css' anywhere.
The plot thickens
Now after reading a a message on google groups i spotted two things:
- He hinted the less compiler in Build.scala to only build certain files. Which isn't a problem for my empty 'zzz' test project (as it doesnt have partial twitter bootstrap less files), but i added these lines nevertheless to test:
lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "q.less")
.- Note: if i type
play-less-entry-points
in the play console i get two empty lines just stating '[info]' ... nothing more. Something wrong there?
- Note: if i type
- He (and someone else) mentioned the play commands
play-copy-assets
andcopy-resources
. I entered these commands at the above replication step at '(*)'. Same result, no css files.
Edit: my 'target' directory listing
My target directory listing after testing the above, and before i 'reset' it with a play clean-all
in the command line looks like this:
cache classes classes_managed src_managed
It doesn't have the mentioned 'resource_managed' directory. Is there a log / verbose mode i can see if the less compilere is called at all. Perhaps there is a less syntax error in my test file? I just dont know anymore :).
Perhaps related, but not important for my question?
Perhaps related and might help me understand it ... but: The official 'site' mentions the use of a double '**' in the lessEntryPoints
lines. Here on stackoverflow uses one '*' and the message on google groups doesn't even use it. How does that work?
My question
I'd like to understand what i'm doing 'wrong' here. With that knowledge i'm sure i'm able to get twitter bootstrap into my play project.