Fabric: Add windows script to new cpp-app template #12374
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the functionality for apps created with the new cpp-app template to run
yarn windows, as an alias forreact-native run-windows, similar to the old template.To do this, I've created a new
templateUtilsmodule for shared template config code, with a newupdateProjectPackageJson()method to make it easy for templates to inject items into a project's package.json file (in this case, a newscriptsentry).Type of Change
Why
Adds a useful feature of the old templates to the new template
What
See above.
Screenshots
N/A
Testing
Verified creating a new project works.
Changelog
Should this change be included in the release notes: yes
The new Fabric app template now supports
yarn windowsas an alias toreact-native run-windowsMicrosoft Reviewers: Open in CodeFlow