Up till now, we've only used a typescript watcher and a webpack watcher. This PR adds in the babel watcher.
TODO: not covered by this PR is auto-regenerating the prescan.json (npx kui-prescan) in a watchy fashion. To do so would I think require somehow hooking into the babel watchers. Because we can only regenerate prescan after babel is done. I don't see (yet) a way to hook into babel in this fashion, i.e. a post-compile watch hook. I did look into using webpack for this, since it does have a notion of post-watch and post-compile; but there is still a race between babel, which results in massive instability. I also contemplated hooking into the typescript watcher (via tsc-watch); we could use this, but it would require rebuilding all of babel on every tiny typescript change. So, for now, one must still rerun npx kui-prescan manually, every time a new kui command registration is added.
Description of what you did:
Required Items
[x] Your PR consists of a single commit (i.e. squash your commits)
[x] Your commit and PR title starts with one of fix: | test: | chore: | doc:, to indicate the nature of the fix (see Conventional Commits)
Optional Items
[ ] 💥 This PR involves a breaking change. If so, include "BREAKING CHANGE: ...why..." in the commit and PR message.
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/kubernetes-sigs/kui/blob/master/OWNERS)~~ [starpit]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
Up till now, we've only used a typescript watcher and a webpack watcher. This PR adds in the babel watcher.
TODO: not covered by this PR is auto-regenerating the prescan.json (
npx kui-prescan
) in a watchy fashion. To do so would I think require somehow hooking into the babel watchers. Because we can only regenerate prescan after babel is done. I don't see (yet) a way to hook into babel in this fashion, i.e. a post-compile watch hook. I did look into using webpack for this, since it does have a notion of post-watch and post-compile; but there is still a race between babel, which results in massive instability. I also contemplated hooking into the typescript watcher (viatsc-watch
); we could use this, but it would require rebuilding all of babel on every tiny typescript change. So, for now, one must still rerunnpx kui-prescan
manually, every time a new kui command registration is added.Description of what you did:
Required Items
fix:
|test:
|chore:
|doc:
, to indicate the nature of the fix (see Conventional Commits)Optional Items