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

[Angular] Use the app name as prefix value for templates #813

Merged
merged 6 commits into from
Sep 14, 2021

Conversation

addy-pathania
Copy link
Contributor

@addy-pathania addy-pathania commented Sep 14, 2021

When developing locally, multiple templates with the same name will conflict causing errors when using strongly typed GraphQL queries.
This feature adds a prefix to some files so that when jss create is run, the prefix is replaced with the appname, which will give each template a unique name in Sitecore when using jss deploy.

Description / Motivation

Added a prefix to pertinent files and filenames in the Angular sample app

Testing Details

Used jss create to scaffold a new Angular app and deployed it to Sitecore along with the sample app - no conflicting template names = no errors!

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update (non-breaking change; modified files are limited to the /docs directory)

@addy-pathania addy-pathania requested a review from a team September 14, 2021 15:23
@vercel
Copy link

vercel bot commented Sep 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sitecore-jss/edge-e2e-styleguide/F5zNhzGT2hzPpqeU3hDjFHSCW4hd
✅ Preview: Failed

[Deployment for 566766b failed]

Copy link
Contributor

@CobyPear CobyPear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few formatting things, and the samples/vue/package-lock.json can be removed from this PR as well (it's a known issue that is to be investigated soon). Looks good otherwise!

@CobyPear CobyPear merged commit 6c6b87f into dev Sep 14, 2021
@CobyPear CobyPear deleted the feature/498048-angular-prefix branch September 14, 2021 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants