Open codeliner opened 1 year ago
@codeliner git clean -dfX data/ packages/ dist/ tmp/
works nicely. Of course, then the server refreshes and throws errors because of missing registry files.
I'm running the create-registry-files.ts
right afterwards, so we have all them regenerated, but somehow the server still thinks they are missing. This is easily resolved by stopping the server process and npm run serve
again, but I'd like to find a solution where this is not necessary or happens automatically.
Is there a way to trigger a restart of the server from command line (i.e. inside my npm run reset-contribution
call)? Or make it re-scan all files, so the errors go away?
Good news @kaitorched I think the restart problem is related to this issue here ,too: https://github.com/proophboard/cody-engine/issues/32
I also recognized that the watch mode sometimes has trouble with too many changes at once. The server tries to restart, runs into a typescript compiler error and is not able to recover from it.
In case of resetting the contribution mode it's not a big deal, because developers can deal with it. But #32 is a real problem, because non-developers will have more trouble figuring out how to recover from such a situation.
When being in contribution mode (executed
prepare-contribution
) it's not that easy to reset the system after working on a topic. It's because generated files are ignored by git, so you cannot simply do a rollback using it.What we could use instead is a script that deletes all files ignored by git
We should restrict deletion of ignored files to the
packages
,data
,dist
andtmp
directories and for example not delete node modules.