Overriding a module's script from a theme

Topics: Customizing Orchard, Writing modules, Writing themes
Aug 18, 2014 at 8:28 PM
I installed one of the modules from the Orchard gallery and would like to override one of its scripts in order to slightly modify the functionality. I tried copying the script into the Scripts folder of my custom theme and making the changes there, but only the script from the original module is being included on the pages.

I would like to make these changes without having to copy the whole module into my source files, but I can't seem to figure out how to get it included correctly. I tried tinkering around with the resource manifest as well with no luck. Any recommendations on how to do this?
Aug 18, 2014 at 10:40 PM
AFAIK scripts (and styles, too) are managed as globally uniquely named resources and you can override them from your theme just by using the same file name (under the Scripts folder in this case). That is only true if the module includes that script through the ResourceManager with Script.Require() (or .Include()).