-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add script to build and watch library and app #435
Conversation
package.json
Outdated
@@ -46,7 +47,8 @@ | |||
"run-example": "cd example && npm start", | |||
"storybook": "start-storybook -p 6006", | |||
"build-storybook": "build-storybook", | |||
"react-scripts": "react-scripts" | |||
"react-scripts": "react-scripts", | |||
"live-edit": "concurrently \"npm run start &\" \"cd example && npm run start\"" |
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 so I don't want to bikeshed too much but with all the "build-blah-and-blah-blah" should this be something like build-all-and-watch
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.
This is actually a question -- not necessarily definitive. Maybe casually poll some folks and see what the general feeling is?
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.
Sounds good! I was hoping for some input on the name.
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'm trying to think of a better name without too much wording as well, but if we want this to follow the other script name schemes maybe we name it something like run-example-and-watch
?
The concurrently package allows npm to run multiple commands concurrently. The repository can be found https://github.com/open-cli-tools/concurrently. Running multiple commands at the same time can be done by using `&` and other work arounds with the script, but this makes the process a lot simpler and makes the output easier to follow.
Previously edits made to the viewer required you to rerun build & run on the command line. This script concurrently runs `npm run start` in the main directory and the example directory.
ff043fd
to
a2e5ff8
Compare
I apologize for |
I don't love pulling in a dependency just for a convenience command but in this case, |
Using the concurrently package found at https://github.com/open-cli-tools/concurrently, this adds the ability to make
changes to components without needing to rerun to viewer to actually see the change.