I have done a little bit of work on this today and really spent some time getting my head around it. I wanted to run through my thoughts and some questions I had.
Proposed solution:
-
Add a chutzpah settings called "CompileToTestHarnessDirectory". This indicates if compiled files (and references) will be stored in the test harness directory.
- The setting will work with all TestHarnessLocationMode's
- If this setting is false (default setting) the files will be compiled in place
- Recreate the folder structure from where the chutzpah.json to the script file inside the test harness directory.
-
If a file is outside of the folder structure (including sub folders) containing the chutzpah.json a warning will be output and compiled in place.
- This may result in an error if RequireJS has been used.
-
Another option is to error when a file is outside of folder structure
Queries
- I think all referenced files would need copying to the new folder structure not only the compiled ones (i.e jQuery)?
-
Is this a worthwhile improvement, or does it add unnecessary complexity when most SC can simple ignore these files?
- My main driver was to allow for the test harness directory to be completely ignored (I use SVN which has poor ignore abilities)
-
What was the reason behind having a custom Test Harness Directory?