Add an initialRun
option to watch to run the watched command first before starting the watcher
#28285
MrSimmmons
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: I'm using Lerna V8.1.8, but I know its just nx under the hood.
I've run into this a few times, I start lerna watch running a build command, start my application, then find that the application that I've started is still using the last build from before I switched branches.
So I want to propose a new flag for the watch command (which would also need to be exposed to the lerna CLI as well for the next version of that) of
--initial
or-i
which will run anything afternx watch --
initially before actually starting the watcher.That way, in this scenario, if I want to switch branches I would just run
yarn dev
which islerna watch -i -- yarn run build
and my application will build, then the watcher is started and will re-build on any file change.Would be a nice QoL addition
Beta Was this translation helpful? Give feedback.
All reactions