Grails asset pipeline exclude not working

2019-08-08 03:33发布

问题:

I have a project on Grails and angular.js. Also I have tests which runs on karma+jasmin. My directory structure is:

  • grails-app
    • assets
      • images
      • javascripts
      • locales
      • stylesheets
      • test

On production all my assets are building on bamboo. The problem is that I want to exclude from compiling test folder with all that inside of it and can't do that.

In my Config.groovy I've added

grails.assets.excludes = ["test/**/(*.js|*.json)"]

Also I've tried different patterns for exclude and they all not working. While building I see that all files inside test folder are being compiled+uglified which I don't want since those are node modules and so on.