-
Notifications
You must be signed in to change notification settings - Fork 355
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
chore(dev): adds openurl support to dev start #238
chore(dev): adds openurl support to dev start #238
Conversation
Pull Request Test Coverage Report for Build 772
💛 - Coveralls |
hmmm getting the following:
Window is undefined then subsequently loads after storybook starts... On subsequent runs... new tab is opened each time. Peeking around...and find this: sindresorhus/open#31 Not so sure how i feel now 😕 Then somehow remembers...create-react-app also has this feature... and 💡 https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/scripts/start.js#L43 I think we do want an AppleScript for this sort of script now? |
package.json
Outdated
@@ -116,7 +118,8 @@ | |||
"storybook:deploy": "storybook-to-ghpages '--script=storybook:build'", | |||
"semantic-release": "semantic-release", | |||
"stylelint": "stylelint --fix 'sass/**/*.scss'", | |||
"travis-deploy-once": "travis-deploy-once" | |||
"travis-deploy-once": "travis-deploy-once", | |||
"openurl": "node -p 'require(\"openurl\").open(\"http://localhost:6006\")'" |
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.
Would it make sense to keep it inside the storybook
context?
e.g. npm run storybook:openurl
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.
It is only being used by storybook, I have no issues with renaming it.
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.
Work's perfect with Fedora
OS
Didn't really wanted to approve it since @priley86 says it's not working on MacOS
On mac as well @priley86, see the same output, we can hide that if yah want, the concurrently annotations, unclear how you want me to proceed, work at it from openBrowser angle? |
@AllenBW yea i think the openBrowser angle is a better one for mac support here... if you don't mind diving into that ;) |
2e24207
to
e5870ef
Compare
@AllenBW beautiful! i'll try it out in just a bit! |
working like a champ now (in the same tab)! I'm happy w/ this... it seems that there is no easy way to wait for Storybook to finish loading (and window opens up empty initially), but i can live with this if others can! thanks! |
Great to see this progress, is it mean it will open browser automatically? |
closes #237
So there are a few ways to skin this cat, alternative approaches (to this pr) include:
node foo.js
(still have the concurrent run issue)Thoughts on this approach all?