-
Notifications
You must be signed in to change notification settings - Fork 237
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
You no longer need to press ctrl-c to exit if you say no to a new port #1887
Conversation
82ad5ff
to
c469384
Compare
c469384
to
1cfde8a
Compare
There is one downside to this approach; changing the port number in |
31ffde8
to
e3d4354
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like how you have tidied this up, particularly separating the dev-server code into a new file !
Thanks @BenSurgisonGDS! I've decided to split those changes into a separate PR, #1890, would you mind approving that? |
this sounds very cool! Reviewing now... |
8c12b17
to
b6cf313
Compare
@@ -48,7 +47,8 @@ function generateAssetsSync ({ verbose } = {}) { | |||
|
|||
function clean () { | |||
// doesn't clean extensions.scss, should it? | |||
del.sync(['public/**', '.port.tmp', portTmpFile]) | |||
// TODO: These files are deprecated, remove this line in v14? | |||
del.sync(['public/**', '.port.tmp', '.tmp/port.tmp']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we still need to delete the port files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case the files are still around for some reason. It's not strictly necessary, just being neat.
b6cf313
to
03f8989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good thanks! Not sure if we want to merge for the next release or not @nataliecarey ?
Argument `app` is never used.
This fixes #462, as the `process.exit(0)` is no longer done within the `nodemon` process. It also means we're not running portScanner every time the kit restarts, and we can remove the code saving the port number to a file. Note changing the port number in `app/config.json` will now require a manual restart.
03f8989
to
e3c47cd
Compare
This PR refactors the code around finding an available port. We now run portScanner only once, when the dev server is started.
This fixes bug #462 (doesn't exit if you say no to a new port), as the prompt to the user and
process.exit(0)
take place outside ofnodemon
. This change also means we can remove the code saving the port number to a file.