Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a replacement for PR's #67 and #69. I had to branch, reset hard, then cherry pick the other commits in before this. That should take care of the somewhat dirty history. Please comment if you want changes, but do let me rescind the PR if you are not satisfied, I think the "push" from before is what got me into difficulty with commits.
--Summary from #67 and 69--
Scripty suffers from the ISVSingleFileGenerator's behavior of always overwriting any output so long as it can compile (just like T4's - which is what scripty is replacing for me). With both ISVSingleFileGenerator, I find that visual studio saves the file all the frigging time, constantly regenerating output. I had looked into creating a custom T4 host a while back and it seemed difficult and had aged documentation, but it seemed far less difficult (sans git woes) to add configurable output behavior to Scripty.
The output behavior still defaults to the original way and will generate outputs if the code compiles, but there are two other possibilities...
Never generate output nothing from output is written
Script Controls Output - letting the script selectively determine which outputs it wants to keep. ex...
I added a Tools -> Options -> ScriptyOptions page in Visual Studio to allow setting this for
ScriptyGenerator
(also now there a place where more settings can be added). There's also a set of command line switches forscripty.exe
This change opens the door for other usages of scripty outside of codegen or build time activity, and even outside of a specific project/solution scope as a script engine.
The temp files were because I have no idea how large of an output some are generating. There was at least one person who wanted raw bytes to make files. Temp files seemed safer than ram and if anything catastrophic happened they could be available for forensics. A default of memory stream and allowance for opting into disk temp files via setting/switch like the outputbehavior could be added I suppose
There were some member naming I changed to clarify the internal usages of default output and additional outputs, and there seemed to be some odd interplay when set file path/extension were used with multiple outputs, as well as flush/close was getting called 2x sometimes or sometimes not at all.
Let me know what needs work, and thanks for your patience.