Twitter Bootstrap and Less Problem

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

Twitter Bootstrap and Less Problem

Philip
I've installed the latest twitter-bootstrap and less-resources plugins so I can customize Bootstrap with my own Less files, but a minimal config does not work (please let me know if there's a better list/forum to post this problem). I'm following the instructions here:

https://github.com/groovydev/twitter-bootstrap-grails-plugin/blob/master/README.md

I've added this to my ApplicationResources.groovy:

        'custom-bootstrap' {
                dependsOn 'bootstrap'
                resource url:[dir: 'less', file: 'custombootstrap.less'], attrs:[rel: "stylesheet/less", type:'css']
        }

To start, custombootstrap.less consisted of one line:

@import "bootstrap.less";

It compiles fine, but when I run-app, I get the errors below. The error messages don't make sense and note that it also fails on bootstrap.less. Even changing custombootstrap.less to be just a comment or a completely empty file gets me the same error message about an unterminated string literal.

Any idea what I'm doing wrong?

Thanks,
Philip


| Error 2012-04-16 23:01:03,347 [pool-7-thread-1] ERROR resourceMappers.LessResourceMapper  - Error compiling less file: C:\Users\Phil\.grails\2.0.1\projects\juggernaut\tomcat\work\Tomcat\localhost\juggernaut\grails-resources\less\custombootstrap.less
Message: unterminated string literal (<script>#17749)
    Line | Method
->>  109 | runtimeError                  in org.mozilla.javascript.DefaultErrorReporter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     96 | error                         in     ''
|    146 | addError . . . . . . . . . .  in org.mozilla.javascript.Parser
|    532 | getToken                      in org.mozilla.javascript.TokenStream
|    172 | peekToken . . . . . . . . . . in org.mozilla.javascript.Parser
|   2245 | primaryExpr                   in     ''
|   1955 | memberExpr . . . . . . . . .  in     ''
|   1813 | unaryExpr                     in     ''
|   1742 | mulExpr . . . . . . . . . . . in     ''
|   1723 | addExpr                       in     ''
|   1703 | shiftExpr . . . . . . . . . . in     ''
|   1677 | relExpr                       in     ''
|   1633 | eqExpr . . . . . . . . . . .  in     ''
|   1622 | bitAndExpr                    in     ''
|   1611 | bitXorExpr . . . . . . . . .  in     ''
|   1600 | bitOrExpr                     in     ''
|   1588 | andExpr . . . . . . . . . . . in     ''
|   1576 | orExpr                        in     ''
|   1559 | condExpr . . . . . . . . . .  in     ''
|   1544 | assignExpr                    in     ''
|   1910 | argumentList . . . . . . . .  in     ''
|   2050 | memberExprTail                in     ''
|   1958 | memberExpr . . . . . . . . .  in     ''
|   1813 | unaryExpr                     in     ''
|   1742 | mulExpr . . . . . . . . . . . in     ''
|   1723 | addExpr                       in     ''
|   1703 | shiftExpr . . . . . . . . . . in     ''
|   1677 | relExpr                       in     ''
|   1633 | eqExpr . . . . . . . . . . .  in     ''
|   1622 | bitAndExpr                    in     ''
|   1611 | bitXorExpr . . . . . . . . .  in     ''
|   1600 | bitOrExpr                     in     ''
|   1588 | andExpr . . . . . . . . . . . in     ''
|   1576 | orExpr                        in     ''
|   1559 | condExpr . . . . . . . . . .  in     ''
|   1544 | assignExpr                    in     ''
|   1523 | expr . . . . . . . . . . . .  in     ''
|   1202 | statementHelper               in     ''
|    707 | statement . . . . . . . . . . in     ''
|    401 | parse                         in     ''
|    338 | parse . . . . . . . . . . . . in     ''
|   2368 | compileImpl                   in org.mozilla.javascript.Context
|   1359 | compileString . . . . . . . . in     ''
|   1348 | compileString                 in     ''
|   1101 | evaluateString . . . . . . .  in     ''
|     42 | compile                       in com.groovydev.LessCompilerService
|     34 | map . . . . . . . . . . . . . in LessResourceMapper
|    139 | invoke                        in org.grails.plugin.resource.mapper.ResourceMapper
|    128 | invokeIfNotExcluded . . . . . in     ''
|    587 | applyMappers                  in org.grails.plugin.resource.ResourceProcessor
|    533 | prepareResource . . . . . . . in     ''
|    602 | doCall                        in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
|     29 | addDeclaredResource . . . . . in org.grails.plugin.resource.util.ResourceMetaStore
|    600 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
|    625 | doCall . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor$_prepareResourceBatch_closure14
|      8 | each                          in org.grails.plugin.resource.ResourceProcessorBatch
|    621 | prepareResourceBatch . . . .  in org.grails.plugin.resource.ResourceProcessor
|    804 | resourcesChanged              in     ''
|    800 | loadModules . . . . . . . . . in     ''
|   1056 | reloadAll                     in     ''
|    172 | doCall . . . . . . . . . . .  in ResourcesGrailsPlugin$_closure3
|    303 | innerRun                      in java.util.concurrent.FutureTask$Sync
|    138 | run . . . . . . . . . . . . . in java.util.concurrent.FutureTask
|    886 | runTask                       in java.util.concurrent.ThreadPoolExecutor$Worker
|    908 | run . . . . . . . . . . . . . in     ''
^    662 | run                           in java.lang.Thread
| Error 2012-04-16 23:01:03,934 [pool-7-thread-1] ERROR resourceMappers.LessResourceMapper  - Error compiling less file: C:\Users\Phil\.grails\2.0.1\projects\juggernaut\tomcat\work\Tomcat\localhost\juggernaut\grails-resources\plugins\twitter-bootstrap-2.0.2.25\less\bootstrap.less
Message: missing ] after element list (<script>#17749)
    Line | Method
->>  109 | runtimeError                  in org.mozilla.javascript.DefaultErrorReporter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     96 | error                         in     ''
|    146 | addError . . . . . . . . . .  in org.mozilla.javascript.Parser
|    160 | reportError                   in     ''
|   2294 | primaryExpr . . . . . . . . . in     ''
|   1955 | memberExpr                    in     ''
|   1813 | unaryExpr . . . . . . . . . . in     ''
|   1742 | mulExpr                       in     ''
|   1723 | addExpr . . . . . . . . . . . in     ''
|   1703 | shiftExpr                     in     ''
|   1677 | relExpr . . . . . . . . . . . in     ''
|   1633 | eqExpr                        in     ''
|   1622 | bitAndExpr . . . . . . . . .  in     ''
|   1611 | bitXorExpr                    in     ''
|   1600 | bitOrExpr . . . . . . . . . . in     ''
|   1588 | andExpr                       in     ''
|   1576 | orExpr . . . . . . . . . . .  in     ''
|   1559 | condExpr                      in     ''
|   1544 | assignExpr . . . . . . . . .  in     ''
|   1910 | argumentList                  in     ''
|   2050 | memberExprTail . . . . . . .  in     ''
|   1958 | memberExpr                    in     ''
|   1813 | unaryExpr . . . . . . . . . . in     ''
|   1742 | mulExpr                       in     ''
|   1723 | addExpr . . . . . . . . . . . in     ''
|   1703 | shiftExpr                     in     ''
|   1677 | relExpr . . . . . . . . . . . in     ''
|   1633 | eqExpr                        in     ''
|   1622 | bitAndExpr . . . . . . . . .  in     ''
|   1611 | bitXorExpr                    in     ''
|   1600 | bitOrExpr . . . . . . . . . . in     ''
|   1588 | andExpr                       in     ''
|   1576 | orExpr . . . . . . . . . . .  in     ''
|   1559 | condExpr                      in     ''
|   1544 | assignExpr . . . . . . . . .  in     ''
|   1523 | expr                          in     ''
|   1202 | statementHelper . . . . . . . in     ''
|    707 | statement                     in     ''
|    401 | parse . . . . . . . . . . . . in     ''
|    338 | parse                         in     ''
|   2368 | compileImpl . . . . . . . . . in org.mozilla.javascript.Context
|   1359 | compileString                 in     ''
|   1348 | compileString . . . . . . . . in     ''
|   1101 | evaluateString                in     ''
|     42 | compile . . . . . . . . . . . in com.groovydev.LessCompilerService
|     34 | map                           in LessResourceMapper
|    139 | invoke . . . . . . . . . . .  in org.grails.plugin.resource.mapper.ResourceMapper
|    128 | invokeIfNotExcluded           in     ''
|    587 | applyMappers . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor
|    533 | prepareResource               in     ''
|    602 | doCall . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
|     29 | addDeclaredResource           in org.grails.plugin.resource.util.ResourceMetaStore
|    600 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
|    625 | doCall                        in org.grails.plugin.resource.ResourceProcessor$_prepareResourceBatch_closure14
|      8 | each . . . . . . . . . . . .  in org.grails.plugin.resource.ResourceProcessorBatch
|    621 | prepareResourceBatch          in org.grails.plugin.resource.ResourceProcessor
|    804 | resourcesChanged . . . . . .  in     ''
|    800 | loadModules                   in     ''
|   1056 | reloadAll . . . . . . . . . . in     ''
|    172 | doCall                        in ResourcesGrailsPlugin$_closure3
|    303 | innerRun . . . . . . . . . .  in java.util.concurrent.FutureTask$Sync
|    138 | run                           in java.util.concurrent.FutureTask
|    886 | runTask . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
|    908 | run                           in     ''
^    662 | run . . . . . . . . . . . . . in java.lang.Thread

Reply | Threaded
Open this post in threaded view
|

Re: Twitter Bootstrap and Less Problem

Philip
Sorry, wasn't thinking; I've now created an issue here:

https://github.com/groovydev/twitter-bootstrap-grails-plugin/issues/30