I have a master file which has references to the JS and the CSS file used for my website. These references are pointing to the non-crunched version of the files. Now, when I hit the Publish button through Visual Studio for my project I want to change the references in my master file to point to the crunched version of the JS and CSS.

Eg: During development if it was pointing to `http://www.example.com/main.js`, during publish it should change the reference to `http://www.example.com/main_min.js`. Is there a way to do this?

Also, before changing the reference I need to run my current js file(main.js) through the tool which outputs the crunched js file(main\_min.js).

Any help on this is appreciated!

Thanks.