Note that there are some explanatory texts on larger screens.

plurals
  1. POPlay 2.0.2-RC2: Less compiler not working for me (Twitter Bootstrap)
    primarykey
    data
    text
    <h1>Goal</h1> <p>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!</p> <h2>Simple reproduction in an empty project</h2> <ul> <li>Downloaded <a href="http://www.playframework.org/download" rel="nofollow noreferrer">http://www.playframework.org/download</a> 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 <a href="https://groups.google.com/forum/?fromgroups#!searchin/play-framework/less$20doesnt$20work/play-framework/PjBzAQm65Sw/tSeZkq7yKeMJ" rel="nofollow noreferrer">here</a>.)</li> <li>Created a new play project <code>play new zzz</code> (zzz=name of the test project).</li> <li>Went to <code>zzz/public/stylesheets</code> and added a file named <code>q.less</code> (its content is the first example on this page <a href="http://lesscss.org/" rel="nofollow noreferrer">http://lesscss.org/</a>, simple variable name usage).</li> <li>Because i'm testing a lot i each time type: <code>play clean-all</code> in the commandline before each new test/Build.scala/etc file change.</li> <li>Started <code>play</code> and typed: <ul> <li><code>reload</code> (don't really know why)</li> <li><code>compile</code> (as per: <a href="http://www.playframework.org/documentation/2.0.1/AssetsLess" rel="nofollow noreferrer">http://www.playframework.org/documentation/2.0.1/AssetsLess</a>)</li> <li>(*) See below</li> <li>i ctrl+d'ed out of play and typed: <code>find . -name *.css</code> and it doesn't show me my 'q.css' anywhere.</li> </ul></li> </ul> <h3>The plot thickens</h3> <p>Now after reading a <a href="https://groups.google.com/forum/?fromgroups#!searchin/play-framework/nilanjan$20play$20compile/play-framework/Qtb3XTn2nJ8/6ZxsXQe3IA8J" rel="nofollow noreferrer">a message on google groups</a> i spotted two things:</p> <ol> <li>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: <code>lessEntryPoints &lt;&lt;= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "q.less")</code>. <ul> <li>Note: if i type <code>play-less-entry-points</code> in the play console i get two empty lines just stating '[info]' ... nothing more. Something wrong there?</li> </ul></li> <li>He (and someone else) mentioned the play commands <code>play-copy-assets</code> and <code>copy-resources</code>. I entered these commands at the above replication step at '(*)'. Same result, no css files.</li> </ol> <h2>Edit: my 'target' directory listing</h2> <p>My target directory listing after testing the above, and before i 'reset' it with a <code>play clean-all</code> in the command line looks like this:</p> <pre><code>cache classes classes_managed src_managed </code></pre> <p>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 :).</p> <h2>Perhaps related, but not important for my question?</h2> <p>Perhaps related and might help me understand it ... but: <a href="https://github.com/playframework/Play20/wiki/Tips" rel="nofollow noreferrer">The official 'site'</a> mentions the use of a double '**' in the <code>lessEntryPoints</code> lines. <a href="https://stackoverflow.com/questions/10436815/how-to-use-twitter-bootstrap-2-with-play-framework-2-0">Here on stackoverflow</a> uses one '*' and <a href="https://groups.google.com/forum/?fromgroups#!searchin/play-framework/nilanjan$20play$20compile/play-framework/Qtb3XTn2nJ8/6ZxsXQe3IA8J" rel="nofollow noreferrer">the message on google groups</a> doesn't even use it. How does that work? </p> <h1>My question</h1> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload