edvinasbartkus/grails-coffeescript-resources — Issue #10: First File in Module Issues
Author: leopoldodonnell
Created: 2012-01-26 22:25:51+00:00
State: open

FIrst files in Modules have a few parsing problems.

1. Block Comments generate an error
2. The first line following a class declaration needs to be blank in some cases

Both generate the message _Problem in line 1_

Here's a example from _Config.groovy_

coffeescript.modules = {
badBlockComment {
files "src/coffee/blockComment"
}

blockCommentsOK {
files "src/coffee/thisPasses", "src/coffee/blockComment"
}
noBlankLine {
files "src/coffee/noFirstBlankLine"
}
}

blockComment.coffee

###
This is a block comment
###
class blockCommented

thisPasses.coffee

class ThisPasses

member: 'there is a blank line above me'

bar: 'bar'

noFirstBlankLine.coffee

class NoFirstBlankLine
foo: 'foo'

bar: 'bar'

This used to work prior to moving from grails 2.0.0RC1 to 2.0.0 - I've suspected my own environment, but haven't been able to identify the problem.

A careful person can workaround these issues, but it would be nice if someone with familiarity with the code could figure this out if it proves to be a problem.