bitovi / academy

Everything we know about frontend, backend, UX, and Devops consulting and management.
https://www.bitovi.com/academy/
14 stars 3 forks source link

Exercise Generator Upgrades #676

Open christopherjbaker opened 3 months ago

christopherjbaker commented 3 months ago

The exercise generator currently copies all files from the previous project build, except any omitted by .delete files. There are a few additions that I think would make it even better.

Change source dir

Instead of building off the previous project, build off files in a specified directory. This would be useful in the TS training, where each project has a common base rather than building up. The specified directory would be used as-is, not building off others. Subsequent projects would still build off this one unless they also changed their source.

Modify files rather than replace them

If there is a file with more than one section, and you make a change, you have to propagate that change to every project that modifies that file going forward. If you could "add X at Y" or "replace Z with W" it would be more flexible. I'm not sure the best way to specify this, though.

The best thought I have is to add comments to the previous files to mark points for future use. Those comments would be stripped from the output whether used or not. Comments like // bookmark tests and //bookmark-start list paired with //bookmark-end list, then specifying that new code should be inserted at tests or should replace list.