I have a javascript file that I minify using the Yahoo YUI. When I ‘Publish’ the web application project, I want it to only copy the .min.js file and not the original one too. I can use a pre-build event to create the minified version, but how do I prevent ‘Publish’ from copying the non minify file?
I suppose I can ‘exclude’ the original non minified file from the project, but that would not be helpful because I want to edit the script file through VS 2010, but when I publish I want the minifier to run first and then publish only that.
Any pointers appreciated
If it’s a web application (and not a web site), just change the Build Action to None in the properties window. This will prevent the original file from being copied when the app is published.