-
Notifications
You must be signed in to change notification settings - Fork 70
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
automatically open webdash url on serve #66
Conversation
it doesn't seem to be working for me I'll debug it tomorrow, it may be related to this opn#86 Note: when developing webdash locally, I use |
scripts/index.js
Outdated
@@ -23,6 +23,7 @@ const serveCommand = argv => { | |||
const url = chalk.underline(`http://${host}:${port}`); | |||
const message = chalk.keyword('green').bold(`Webdash running on ${url}!`); | |||
console.log(message); | |||
opn(url) |
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.
okay here's why it's not working:
url is formatted text from chalk.underline
. So you want to save the url
before formatting it, and then after formatting it
and opn
should only take url
(unformatted)
also please wrap opn(url)
with a try catch:
try {
opn(url);
} catch(error){}
because if it didn't work, it's not a big deal, and users might think that webdash is broken if opn
broke (whereas webdash is still working)
okay I found the issue 😄 |
i’ll fix this today |
fix is here 37be3ac |
Thanks! 😄 |
Pretty fast 😄 |
😄 |
can you please wait for jadjoubran/webdash-npm-scripts#6 and then we release ? pull request in a few hours |
Sure no rush btw! I can release webdash without having to publish all the other plugins |
would you please create a community in https://gitter.im for webdash so anyone contributing can talk easily ? |
this is for #64