-
Notifications
You must be signed in to change notification settings - Fork 129
Does gulp-typescript play nice with Visual Studio? #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can use this with Visual Studio, but you need to make sure VS won't compile the .ts files. I don't know exactly how you should do that.. You can use windows power shell for example to run I can add this to the readme if this solves your questions. |
Using the Task Runner Explorer, Grunt Launcher, and Package Intellisense extensions should give you everything you need to work almost entirely in VS2013 (this is all built in to 2015). And if you need to use the command line then the Open Command Line extension makes that a bit easier as well. If you start using a setup like this you'll need to update all of your typescript files so their Build Action is set to I'm not sure if this was unique to my setup or not but I'd recommend not running gulp as a post build step and instead do something like run gulp-watch on startup or from a console. When running gulp post build with F5 I found the site would start to load before gulp finished and then my css & js would return 404s. Edit: This shows the features in VS2015 but using the extensions I mentioned above will give you almost the same functionality in VS2013. |
Thanks for the pointers. I'm already using gulp for js minification and concatenation with task runner extension. Was wondering about getting the TS compilation in the mix too. Do you lose intellisense when you switch to content files? That'd be a blocker for me. |
I have ReSharper installed but I've disabled js & ts support since it doesn't support |
Nice. (I've also disabled resharper for the same reasons) |
See microsoft/TypeScript#2326 for a proposal to make it easier to use gulp & Visual Studio together. |
Thanks for the pointer @ivogabe |
I'd advise everyone to use the new Visual Studio Code, which support typescript & gulp out of the box. It's also available for mac & linux. For the normal Visual Studio users, this page from grunt-ts might be useful: How to disable the Visual Studio TypeScript build. |
Use the command line, conemu, cygwin ex: http://superuser.com/a/900232/436535 IDE integration only leads to frustration and missed opportunity. Use gulp-watch and some proper terminal configuration and bliss |
See also .csproj option (I think it also works in .njsproj files) from microsoft/TypeScript#2326 to stick in PropertyGroup AFTER the Microsoft.TypeScript.targets as follows:
See also: https://shauntm.com/notes/entries/231 |
I wrote a guide to replace the default compilation of TypeScript files in Visual Studio by Gulp: https://www.meziantou.net/2017/10/23/compiling-typescript-using-gulp-in-visual-studio |
Hi people!
I've just stumbled upon gulp-typescript as I was looking into some gulp related continuous release stuff.
This looks really interesting - my question is: is this only intended to be used outside of Visual Studio? Or if not, how does it fit in when used inside Visual Studio? Do you need to prevent VS from performing the compilation perhaps?
I think it might be beneficial (perhaps not only to me 😄) to enhance the readme.md to clarify this....
The text was updated successfully, but these errors were encountered: