Skip to content
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

Merged
merged 5 commits into from
Jun 13, 2022

Conversation

tuckerzp
Copy link
Contributor

@tuckerzp tuckerzp commented Jun 10, 2022

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.

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team June 10, 2022 17:26
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\""
Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@Bronstrom Bronstrom Jun 10, 2022

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?

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
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.
@tuckerzp tuckerzp force-pushed the feature/update-viewer-live-script branch from ff043fd to a2e5ff8 Compare June 13, 2022 14:23
@tuckerzp
Copy link
Contributor Author

I apologize for force-push here. I needed to fix the merge conflicts as well as address review comments.

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team June 13, 2022 14:58
@kylelaker
Copy link
Contributor

I don't love pulling in a dependency just for a convenience command but in this case, concurrently seems popular enough and I think this command provides sufficient value to justify it.

@Bronstrom Bronstrom merged commit e73b309 into develop Jun 13, 2022
@Bronstrom Bronstrom deleted the feature/update-viewer-live-script branch June 13, 2022 15:10
@kylelaker kylelaker changed the title Add live edit feature Add command to build and watch library and app Aug 29, 2022
@kylelaker kylelaker changed the title Add command to build and watch library and app Add script to build and watch library and app Aug 29, 2022
@kylelaker kylelaker added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants