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

[Next.js] Introduce nextjs-xmcloud Initializer Template #1653

Merged
merged 8 commits into from
Nov 7, 2023

Conversation

ambrauer
Copy link
Contributor

@ambrauer ambrauer commented Nov 6, 2023

Description / Motivation

Introduced a nextjs-xmcloud initializer “system” template which will contain all XM Cloud base features, including Personalize, FEaaS, BYOC, Edge Proxy and Context support. Moved everything related to these features from nextjs base template to nextjs-xmcloud. This keeps the base nextjs template free of XM Cloud-only artifacts for SXP.

Note: this replaces the previous nextjs-personalize template.

The following changes are made to the JSS initializer (create-sitecore-jss) flow:

  • When nextjs is the selected framework, a new prompt shows:
    • "Are you building for XM Cloud?" y/N
      • If yes, nextjs-xmcloud is added to template list
  • Answer will narrow add-ons in list:
    • nextjs-styleguide (SXP and XMC)
    • nextjs-styleguide-tracking (SXP)
    • nextjs-sxa (SXP and XMC)
    • nextjs-multisite (SXP and XMC)
  • New parameter -xmcloud to control prompt via CLI

This PR also includes a follow-up to #1649, moving the skipping of site information fetch on XM Cloud to the GraphQLSiteInfoService.

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

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)

@ambrauer ambrauer requested a review from a team November 6, 2023 22:54
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Looks great! 👍 See only one comment below that we discussed

@ambrauer ambrauer merged commit 19f5c22 into dev Nov 7, 2023
1 check passed
@ambrauer ambrauer deleted the feature/JSS-1117-nextjs-xmcloud-template branch November 7, 2023 16:06
art-alexeyenko pushed a commit that referenced this pull request Nov 8, 2023
* rename nextjs-personalize -> nextjs-xmcloud. move feaas and BYOC here.

* Move Sitecore Edge Platform / conext related items to nextjs-xmcloud

* Repurpose nextjs-personalize -> nextjs-xmcloud initializer "system" template (driven by prompt / --xmcloud CLI option)

* Moved skipping of site information fetch on XM Cloud to base package (GraphQLSiteInfoService)

* CHANGELOG update

* fix scaffold samples

* removed <BYOC/> from sxa Layout.tsx

* fix for PR comment

(cherry picked from commit 19f5c22)
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