Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript with atom-typescript plugin vs gulp task

I'm just getting into TypeScript as I am learning Angular (2.0). I'm devising the best way to compile TypeScript and how to organize my project.

I am using atom-typescript for Atom to compile the ts files with a tsconfig file, but I'm curious if I should be using a gulp task instead since I will eventually want to concatenate and uglify the js output of the ts files. As far as I know, I cannot do this with the atom-typescript plugin. If I do start using a Gulp task, the sacrifice will be the code-hinting and feedback that atom-typescipt provides in the editor.

Or perhaps I should let the plugin do the transpiling and use gulp to uglify the resulting js. ???

Is there a happy-medium, best-practice way I should handle this?

Thanks! Matt

like image 410
Mattaton Avatar asked Oct 18 '22 12:10

Mattaton


1 Answers

Why not use both? You can use Atom to edit and compile your TypeScript and Gulp task to concatenate and uglify the resulting JavaScript. That's what I do and it works great. You get linting and instant compilation, but when you're ready for production you run your Gulp task.

like image 86
rgvassar Avatar answered Oct 22 '22 06:10

rgvassar