bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
194 stars 92 forks source link

Grails Asset pipeline plugin don't have feature of override module similar to Resource plugin #211

Closed ravikovour closed 6 years ago

ravikovour commented 6 years ago

As Grails Asset pipeline is a replacement for Grails Resource Plugin there is no option to achieve 'overrides' feature similar grais resource plugin.

With Grails Resource plugin we can override a module or particular resource of a module.

Plugin-A Resources.groovy

modules = { 'businessModule' { resource url:[plugin: 'pluginA', file: 'js/jquery/jquery-1.7.2.js'] resource url:[plugin: 'pluginA', file: 'js/jquery/jquery-ui-1.8.15.custom.js'] resource id: [plugin: 'pluginA', file: 'js/select2/select2-v1.js'] }

Plugin-B Resources.groovy

modules = { / Override select2.js of the Plugin-A / overrides { 'businessModule' { resource id: [plugin: 'pluginA', file: 'js/select2/select2-v1.js'], url: [file: 'js/select2/select2-v2.js'] } }

davydotcom commented 6 years ago

you can by simply placing the asset in the master project instead of in the sub project but an override from a plugin no