Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents 97fc042 + 2162aeb commit ad174071639396d27435c58538f4b9c88adbddf5 @splix splix committed May 4, 2012
Showing with 30 additions and 4 deletions.
  1. +26 −0 README.md
  2. +4 −4 grails-app/conf/BuildConfig.groovy
View
26 README.md
@@ -23,5 +23,31 @@ coffee {
resource url: 'cs/models.coffee'
}
</pre>
+
+Files should be located:
+<pre>
+- web-app
+ - js
+ - app/.js
+ - cs
+ - views.coffee
+ - models.coffee
+</pre>
+
The above example will create a resource you can include in pages or have another resource depend on. The CoffeeScript files are converted
to JavaScript, and included like any of your JavaScript files. The default disposition for your CoffeeScript follows the JavaScript default: "defer" - that is they will appear at the end of your page.
+
+## Problems
+Every resource module is compressed to bundle. By default .coffee files are not added to any bundle. In order to have it in the bundle you must explicitly declare bundle attribute for the resource line or defaultBundle for the module.
+<pre>
+ modules {
+ example1 {
+ defaultBundle 'example1'
+ resource url: 'cs/test.coffee'
+ }
+
+ exmaple2 {
+ resource url: 'cs/test.coffee', bundle: 'example1'
+ }
+ }
+</pre>
View
8 grails-app/conf/BuildConfig.groovy
@@ -11,17 +11,17 @@ grails.project.dependency.resolution = {
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsCentral()
+ grailsRepo "http://grails.org/plugins"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
runtime 'org.mozilla:rhino:1.7R3'
}
plugins {
- runtime(":resources:1.1.6")
- build(":tomcat:$grailsVersion",
- ":release:1.0.0") {
- export = false
+ build ":release:2.0.0", {
+ export = false
}
+ runtime(":resources:1.1.6")
}
}

0 comments on commit ad17407

Please sign in to comment.