We are a Microsoft shop, developing with Visual Studio. We are building a single page app, and we have elected to use Gulp to handle a lot of the script build tasks (javascript minification, css minification, etc).

We are using typescript, and the thing I find intriguing is that I can use Visual Studio (and MSBuild from the build server) to compile the .ts files to .js, or I could use a Gulp task.

I'm trying to weigh the pros and cons of each option. I'm sure that a lot of it comes down to preference, what are some criteria that I should consider as I make a decision?

closed as off-topic by Robert Harvey, Bart van Ingen Schenau, Ixrec, Adam Zuckerman, gnat Jun 20 '16 at 6:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to find or recommend tools, libraries, programming languages, resources (including books, blogs, tutorials, and examples), or projects to undertake are off-topic here as they attract opinionated answers that won't have lasting value to others. You may be able to get help in The Whiteboard, our chat room." – Robert Harvey, Bart van Ingen Schenau, Ixrec, Adam Zuckerman
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    This would be a better question if you were actually asking a question, and not asking us to "share our experiences." Can you restate the question in such a way that it's not soliciting a discussion? Otherwise, get a piece of paper and fold it in half. Write the pros on the left hand side, and the cons on the right hand side, evaluate what you have written, and then make a decision. – Robert Harvey Jun 7 '16 at 0:10
  • @RobertHarvey Thank you for the suggestion. Re-working the question. – JMarsch Jun 7 '16 at 0:20
  • 1
    I think the scope of this question is narrow enough that it won't fall into the pattern of generating "huge lists of ever changing options" that caused recommendation questions to be closed in the first place. I'm voting to reopen. – Rachel Jul 21 '16 at 13:34
  • @RobertHarvey At risk of sounding obtuse, I'm going to have to say I'm very frustrated with your comment. I agree with idea of writing the pros and cons. What I'm asking for in this question is help to know what the pros and cons are. I'm not asking someone to make a decision or even to render an opinion, I'm asking for insight into what the tradoffs are. Increasingly, the Stack Exchange sites seem to be less about being a place for answers, and more about being a place for easy answers and high google ad-word traffic. – JMarsch Nov 4 '16 at 20:20
  • Using Gulp, you can add lots of functionalities in the front-end pipeline such as minification or running tests. I wrote a guide to replace the compilation of TypeScript files in Visual Studio by gulp in Visual Studio 2017: meziantou.net/2017/10/23/… – meziantou Oct 25 '17 at 2:11

Using VS/Msbuild has the advantage of probably giving you a better IDE integration than third-party build tools. So for the main compiling tasks, you may consider to use the former - you typically get things like automatic positioning to the code line which caused an error during compiling.

However, if you have already created some other tasks like "minification" with another tool for which IDE integration is of minor importance, and you are satisfied with that solution, I suggest you keep it that way. You can also call your "gulp" scripts from MSBuild scripts, using the Exec command. I did this in the past to embed classic windows shell scripts into an Msbuild script; once you get yourself through the hassle of understanding the XML-based Msbuild syntax, you can surely create a useful solution that way.

That way, you can try both in parallel for a while, get more experience with both and rethink your decision later based on that experience.

  • Thanks Doc -- based upon what I know right now, I think that I will let Visual Studio/MSBuild handle compilation of the typescript, and let Gulp handle ngInject/minification/concatenation/compression of the resulting .js files. Seems like the right balance for now – JMarsch Jun 7 '16 at 15:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.