I've installed the TypeScript for Visual Studio 2015 tools and the compile is wicked fast (compared to my old Gulp process). I have compile on save setup in the tsconfig file and that all works great!
However, if I undo a change from source control, it doesn't seem to trigger the compile the way Ctrl+S does. Is there any ways to make VS kick off a file save on a file that was changed by source control?
1 Answers
Answers 1
Note that there are 3 different way to "undo a change" in source control: See "Undo changes"
- Discard uncommitted changes to a file, bringing the file back to the version in the last commit.
- Reset your local branch to a previous commit.
- Revert changes pushed to a remote branch and shared with others.
There is no git hook for post-reset action.
(Even though Visual Studio 2017 did introduce client-side Git hook support)
That leaves you with some kind of service hook, but they are on the server side (for an upstream Visual Studio Online project)
What might work if is your reset/undo affect the active document.
In that case, you can use the DocumentEvents
to trigger a typescript compilation.
It is not a complete solution, but a starting point.
0 comments:
Post a Comment