LessCss Plugin w/BootStrap Error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LessCss Plugin w/BootStrap Error

John Thompson
I'm trying to get the lesscss plugin working with bootstrap per the directions here:  https://github.com/groovydev/twitter-bootstrap-grails-plugin/blob/master/README.md

I'm getting the stack below, which isn't giving me much to go on.  

My first time using these plugins & less.  Any suggestions on troublshooting this guy?  I tried running it through the debugger, but the expection of 'object Object' isn't too helpful!

twitterbootstrap.BootstrapResources dirLessSource: null
twitterbootstrap.BootstrapResources dirTarget: null
twitterbootstrap.BootstrapResources config: grails.plugins.twitterbootstrap.fixtaglib = true
twitterbootstrap.BootstrapResources config: grails.plugins.twitterbootstrap.defaultBundle = bundle_bootstrap
twitterbootstrap.BootstrapResources is lesscss-resources plugin loaded? true
twitterbootstrap.BootstrapResources is jquery plugin loaded? true
resourceMappers.LessResourceMapper Error compiling less file: /Users/john/.grails/2.0.4/projects/salon/tomcat/work/Tomcat/localhost/_/grails-resources/less/custom-bootstrap.less
org.mozilla.javascript.JavaScriptException: [object Object] (<script>#17742)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2690)
        at script(<script>:17742)
        at script(<script>:14732)
        at script(<script>:17735)
        at script(<script>:17749)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
        at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
        at org.mozilla.javascript.Context.evaluateString(Context.java:1104)
        at com.groovydev.LessCompilerService.compile(LessCompilerService.groovy:42)
        at LessResourceMapper.map(LessResourceMapper.groovy:32)
JT
jts-blog.com
Reply | Threaded
Open this post in threaded view
|

Re: LessCss Plugin w/BootStrap Error

longwa
There are two LESS plugins for Grails:

lesscss-resources
less-resources

I think you are using the second one which we had a lot of issues with. I started fixing some of them and submitted pull requests to the author but so far they've been ignored completely.

The twitter-bootstrap plugin will use either of the LESS plugins above so my advice would be to use the lesscss-resources plugin (by Paul Fairless, I think). It is more recent and Paul seems more responsive to bugs and changes.

Also, the twitter-bootstrap plugin by groovydev does not work as advertised. Namely, I could never override any of the plugin files such as variables.less in my own application for customization. LESS imports don't seem to understand the layout of application/plugin paths and will fail to find your files.

This led us to use the lesscss-resources plugin and drop in the bootstrap LESS files manually (which the plugin handles ok). We have a main.less and we just import the bootstrap.less into that. Just add the a line similar to:

        resource url: '/less/main.less', attrs:[rel: "stylesheet/less", type:'css']

in your ApplicationResources.groovy and you are good to go.

-Aaron

On Sun, Jul 15, 2012 at 3:53 PM, John Thompson <[hidden email]> wrote:
I'm trying to get the lesscss plugin working with bootstrap per the
directions here:
https://github.com/groovydev/twitter-bootstrap-grails-plugin/blob/master/README.md

I'm getting the stack below, which isn't giving me much to go on.

My first time using these plugins & less.  Any suggestions on troublshooting
this guy?  I tried running it through the debugger, but the expection of
'object Object' isn't too helpful!

twitterbootstrap.BootstrapResources dirLessSource: null
twitterbootstrap.BootstrapResources dirTarget: null
twitterbootstrap.BootstrapResources config:
grails.plugins.twitterbootstrap.fixtaglib = true
twitterbootstrap.BootstrapResources config:
grails.plugins.twitterbootstrap.defaultBundle = bundle_bootstrap
twitterbootstrap.BootstrapResources is lesscss-resources plugin loaded? true
twitterbootstrap.BootstrapResources is jquery plugin loaded? true
resourceMappers.LessResourceMapper Error compiling less file:
/Users/john/.grails/2.0.4/projects/salon/tomcat/work/Tomcat/localhost/_/grails-resources/less/custom-bootstrap.less
org.mozilla.javascript.JavaScriptException: [object Object] (<script>#17742)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2690)
        at script(<script>:17742)
        at script(<script>:14732)
        at script(<script>:17735)
        at script(<script>:17749)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
        at
org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
        at
org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
        at org.mozilla.javascript.Context.evaluateString(Context.java:1104)
        at com.groovydev.LessCompilerService.compile(LessCompilerService.groovy:42)
        at LessResourceMapper.map(LessResourceMapper.groovy:32)

-----
JT
jts-blog.com
--
View this message in context: http://grails.1312388.n4.nabble.com/LessCss-Plugin-w-BootStrap-Error-tp4631564.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email