Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
scroll top