Where to configure grails.assets.excludes for the Grails asset pipeline?

Where should I configure grails.assets.excludes for the Grails asset pipeline?

According to http://bertramdev.imtqy.com/asset-pipeline/guide/configuration.html you can include or exclude files for Asset Pipeline.

However, he does not indicate where to add it. for example Do we put it in Config.groovy?

It seems I never work with the code below:

index.gsp

<asset:stylesheet src="application.css" />

application.css

*= require_tree ../stylesheets

test.css (located in the assets / stylesheets / testing.css section):

body { background: green; }

Config.groovy (I assume this is the place to add configuration):

grails.assets.excludes = ["**/testing.css"]

Everything else works separately from one problem: it never excludes test.css.

- ? BuildConfig.groovy, .

:

  • Grails 2.4.2
  • compile ": resource-pipe: 1.8.11"
+4
3

grails.assets.excludes Grails ?

, config.groovy.

( css ):

grails.assets.plugin."routing".excludes =["**/*.css"]

( 1.9.6 )

+1

grails 3.1 build.gradle:

assets {
    minifyJs = true
    minifyCss = true
    excludes = ["**/*.html"]
}
+1

, .

  • , , config.groovy.

    Example You have a javascript file for which jquery.jsyou do not need to compile jQuery, because when the javascript file is processed, jQuery will be bundled with it.

    grails.assets.excludes = ["jquery.js"]
    grails.assets.includes = ["application.js"]
    
  • Prefix Files You Don't Want To Precompile With Underscore (_)

    Example

    The original file name to be compiled individually: example.js

    New file name to be excluded: _example.js

source

0
source

All Articles