Closed altavir closed 9 years ago
The bug appears while using bootstrap 3.3.5 stylesheets. After I have deleted all unnecessary files, everything works fine.
The default behavior for Grain is to parse and run embedded Groovy code ${ ... } for all the non-binary template files, this often comes in handy for passing configuration parameters from the page model to javascript or stylesheets. In this case, it looks like Grain finds ${ in the bootstrap files and tries to parse the presumed Groovy code which causes the error.
To disable this you can add the file extension to the list of non-script files in the SiteConfig.groovy:
non_script_files = [/(?i).*\.(js|css)$/]
We are going to add the default configuration in the next revision, so users won't encounter the error after adding third-party files to the project.
Ok, thank you, I think this solves the problem. By the way, thank you for the great tool. It would be good to have basic JBake-like predefined templates for simple projects.
Preview is working fine but when i am trying to either run generate task or run grainw.generate, I am getting StackOveflow cycle:
I am getting the same behavior with gradle 1.8 and 2.6.
Update: With little debugging I found that problem is narrowed to this method:
With
curStatement = "PLAIN_CODE"
andstatment = "GSTRING_WRITE"
it always produces zero which causes the loop.