Hi Andy,
Thanks for the kind words. I don't think anyone would believe me if I mentioned how many hours it took to create MyComponent.
Bootstrap is guaranteed to be non-destructive, which means it won't ever update files or objects that already exist. If you add stuff to the config file, bootstrap will create new files (and objects in MODX) that aren't there already. Renaming the file let bootstrap create it (because there was no existing file), but it's not really the correct method.
Export Objects is meant to update the object source files, and more to the point, update all the files used in the build. Export Objects, with a few exceptions, bases the build files on what already exists in the Manager and on the disk, rather than what's in the config file. Export Objects always copies the master config file (the one you edit) to the local directory, so any new builds will use the new config file. If you don't run Export Objects, the local config file is never updated.
I work on the disk for almost everything. The one thing you always want to do is either have everything on the disk ahead of what's in MODX, or vice versa. It's a potential catastrophe do some work on the disk, and then some work on other objects in the Manager. You have to do some cutting and pasting before performing an action in MyComponent to prevent losing some of your work .
So, to add a new capability (chunk, template, sub-package, etc.), what I do is -- first synchronize the disk files with what's in the Manager by doing step one or step two below:
1. If the disk files are ahead of what's in MODX, run Import Objects and then Export Objects.
2. If the stuff in the Manager is ahead, run Export Objects.
3. (optionally commit to git).
4. Modify the config file to add your new object or file
5. Run Bootstrap
6. Edit the new objects or files as needed
7. If you did the work in the Manager, run Export Objects
8. If you did the work on disk, run Import Objects, then Export Objects
I hope that all makes sense.