-
Notifications
You must be signed in to change notification settings - Fork 376
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
fix: add ability to update the boilerplate content #3575
Conversation
… scripts and readme file) in an existing project
@sangwoohaan can you check out the design for this new feature and let me know if you've got requested changes? |
GREAT QUESTION from @sangwoohaan -- how does the user know they need to update these scripts? Do we need to link this to a function that will track which version of Composer was used to create a project? (And then some mechanism that allows composer to update a project from version x to version y?) ALSO NOTE: when we move provisioning into composer, we will no longer need the current set of scripts. So maybe we don't need this at all? ALSO NOTE: no changes have happened to the scripts since 1.0.1, and no changes are currently planned... so this would be useful to a small number of users. |
We decided to check against the version number in the package.json file inside scripts/ to determine if this option should be displayed. I will update the PR. |
…json before showing UI to update it
This PR has been updated with a version check using the package.json file present inside the boilerplate content. The UI ONLY appears if expected boilerplate content is out of date or missing. |
* Fixes microsoft#3102: add ability to update the boilerplate content (currently scripts and readme file) in an existing project * check version of boilerplate * check against installed version of boilerplate using scripts/package.json before showing UI to update it * wrap string informatMessage Co-authored-by: Chris Whitten <[email protected]>
Description
On load of the runtime settings page, the client will now make an API call that returns the current package.json version from the scripts/ folder in the project, the LATEST version of that file from the "boilerplate" template, and a boolean indicating whether the project version needs to be updated.
If the project version is missing or out of date, a new box will appear on the page with a button that allows the user to update this content - the scripts and readme files that come with every new project. This option will be display whether or not the runtime has been ejected. It does not affect the runtime code itself - only the provisioning scripts.
Task Item
Closes #3102
Screenshots
This GIF shows a project where the boilerplate is old. The UI is present. I click the button, the boilerplate is updated. I navigate away, navigate back: the warning and the UI are now hidden because the boilerplate is up to date.