0

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?

5
  • 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. Jun 7, 2016 at 0:10
  • @RobertHarvey Thank you for the suggestion. Re-working the question.
    – JMarsch
    Jun 7, 2016 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, 2016 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, 2016 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, 2017 at 2:11

1 Answer 1

0

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.

1
  • 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, 2016 at 15:46

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