forked from paulfairless/grails-lesscss-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLesscssResourcesGrailsPlugin.groovy
More file actions
39 lines (35 loc) · 1.28 KB
/
LesscssResourcesGrailsPlugin.groovy
File metadata and controls
39 lines (35 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import org.grails.plugin.resource.ResourceService
import org.grails.plugin.resource.ResourceTagLib
class LesscssResourcesGrailsPlugin {
// the plugin version
def version = "0.6.1"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "1.3.5 > *"
// the other plugins this plugin depends on
def dependsOn = [resources:'1.0 > *']
def loadAfter = ['resources']
// resources that are excluded from plugin packaging
def pluginExcludes = [
"grails-app/views/*.gsp",
"web-app/less/*"
]
def author = "Paul Fairless"
def authorEmail = ""
def title = "Less CSS Resources"
def description = '''\\
This plugin supports server-side compilation of .less CSS files to their .css counterparts.
'''
// URL to the plugin's documentation
def documentation = "https://github.com/paulfairless/grails-lesscss-resources"
def doWithSpring = { ->
// monkey-patch ResourceService and ResourceTagLib to support .less files
ResourceService.DEFAULT_MODULE_SETTINGS['less'] = [
disposition: 'head'
]
ResourceTagLib.SUPPORTED_TYPES['less'] = [
type: "text/css",
rel: 'stylesheet/less',
media: 'screen, projection'
]
}
}