Open saeedcheginy opened 5 years ago
It's not syncing, but we have a script to delete all generated files, and then just run "Render all templates" command for Typewriter.
Also if you have "Add generated files to VS project" enabled(*), you can see those files that are no more relevant to be outside those .tst file, not under them on Solution Explorer. So simply by deleting all those generated files that are not under your .tst files, you are done.
(*) which I do NOT recommend, as Visual Studio file management is worst I have seen and makes rendering templates dog slow. Eg. our full template rendering would take more than 1 hour(!!!) with "Add generated files to VS project", while it takes only less than 10 seconds to render all templates when that option is set to false. YMMV, of course.
It's not syncing, but we have a script to delete all generated files, and then just run "Render all templates" command for Typewriter.
Also if you have "Add generated files to VS project" enabled(*), you can see those files that are no more relevant to be outside those .tst file, not under them on Solution Explorer. So simply by deleting all those generated files that are not under your .tst files, you are done.
(*) which I do NOT recommend, as Visual Studio file management is worst I have seen and makes rendering templates dog slow. Eg. our full template rendering would take more than 1 hour(!!!) with "Add generated files to VS project", while it takes only less than 10 seconds to render all templates when that option is set to false. YMMV, of course.
Thank you for quick respond :) ,I don't use "Add generated files to VS project" because my Typescript project is a separated web project. The command idea could be nice but very good point about Typewriter is that everything just work automatically, I mean with changing a class like adding a property or whatever it works very well without any need to think about it or executing a command, but it doesn't work just when you delete or rename some file which I believe it's possible to add as a new feature by an acceptable pain.
Currently, this is the biggest issue with Typewriter. If we had support for deleting/renaming classes then I feel that this would be perfect enough for anyone that's using Typescript in their project to use.
The problem is when I rename a class or remove one in c#, Typewriter can't detect and remove related typescript classes , which cause a mess with a lot of unused typescript classes in long term. For example if we could override the way of creating file in target, and we were notified when a class is removing or renaming then we could manage it in very customizable way.