-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc(v2): better dx: yarn clear, yarn watch, yarn serve #2922
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 5df2fbf |
@yangshun I think it's complicated to hot reload the D2 code, tried to hack a bit with nodejs child processes / spawn etc but it's not easy. Found a solution to automatically restart the server. It's probably not the fastest DX we could get as each restart takes a few seconds, but it's still better than current DX and is a tiny change so could do the job for now:
|
yarn clean
: cleanup of useful folders (ts incremental build, babel cache, /lib...)yarn watch
: start incremental TS compiltation in --watch mode over the whole projectyarn serve
: useserve
to serve a production build of the projectI tried to create a
watchPlugin
on the website, because I don't like constantly restarting the site, but I don't think it's possible to live-update the plugins' code at runtime :(The watch mode, even without hot code reload, could be useful. We could watch all packages, and only need to run
yarn start:v2
to restart the site, instead ofyarn start
that will recompile each package. The developer feedback would be faster.