Add an option for compile-on-save to trigger VS pre- and post-build events #2252
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Out of Scope
This idea sits outside of the TypeScript language design constraints
Suggestion
An idea for TypeScript
Visual Studio
Integration with Visual Studio
I have a TS project that's compiled to a single file, where I need to append some additional code to the resulting combined file. I added a VS post-build action to perform the processing every time I build the solution. It works fine when
Build -> Build Solution
(F6) orBuild -> Rebuild Solution
are used, but not following a compile-on-save, leading to the resulting .js file missing the expected additional code.My current workaround is using a Grunt script that monitors the compiled .js file for changes and executes whenever it's modified. This might work fine for post-build actions in most cases (except perhaps in situations requiring tight VS synchronization with build start/completion) but doesn't support pre-build actions and generally isn't very elegant as it requires maintaining an additional background process.
It would be useful to have an option (which may or may not be enabled by default) to trigger the pre- and post-build events with this compilation method as well.
This (optional) behavior could be extended to other compiled-on-save languages such as LESS, SASS, Coffeescript etc. (though in these cases it's probably more of a Web Essentials suggestion).
The text was updated successfully, but these errors were encountered: