2

Interested how others are organising their scripts in Visual Studio ?

Currently, the project I am working on has a large number of scripts and getting confused how to organise them into an arrangement without something like

<% if (Helper.IsDebug()) { %>
<%=SOME SCRIPT%>
<% } %>
<% if (Helper.IsRelease) { %>
<%=SOME SCRIPT%>
<% } %>

all over the place? Is there some easy way to organise scripts [or some tool] that allows easy packing, minification etc on release build ?

Thx

1 Answer 1

2

This article describes a good solution for what you are trying to do:

http://encosia.com/2009/05/20/automatically-minify-and-combine-javascript-in-visual-studio/

Essentially, for a Release mode build, you would create a pre-build event that does the combining and minification using one of the popular, free compression tools (like YUI Compressor).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.