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

feat(create-medusa-app): add install Next.js storefront option #4968

Merged
merged 12 commits into from
Sep 8, 2023

Conversation

shahednasser
Copy link
Member

@shahednasser shahednasser commented Sep 6, 2023

What

  • Adds the ability to install the Next.js storefront along with the Medusa backend when using the create-medusa-app command. This can be done either through passing the --with-nextjs-starter option or answering "y" when asking about installing the Next.js starter.

Note: The branch cloned of the medusa starter default should be removed before merging this PR

Testing

With Next.js Starter Without Option

  1. Run the command (either locally or through the snapshot).
  2. When asked about the Next.js starter, answer "y" (default is "N")
  3. Wait for the installation steps to finish, including the Next.js starter. The starter will be installed under the [project-name]-storefront directory. [project-name] is the name you provide to the project in the first question. Please note that the Next.js storefront installation time might be long.
  4. Once the backend/admin runs, the Next.js storefront will run in the background. You can ensure it's working by opening localhost:8000 in your browser. The Onboarding flow in the admin should be tailored towards the Next.js starter
  5. Terminate the process and check if the Next.js storefront is still running by opening it in your browser again. The storefront should fail to open.

With Next.js Starter Using Option

  1. Run the command (either locally or through the snapshot) and pass it the --with-nextjs-starter option.
  2. You won't be asked about installing the Next.js starter, but it will be part of the next steps.
  3. Follow the same testing steps as the previous section starting from number 3.

Without Next.js Starter

  1. Run the command (either locally or through the snapshot)
  2. When asked about the Next.js starter, answer "N" or just press enter
  3. The setup process should continue without installing the Next.js storefront and the onboarding should work without any change.

@shahednasser shahednasser requested a review from a team as a code owner September 6, 2023 13:21
@changeset-bot
Copy link

changeset-bot bot commented Sep 6, 2023

🦋 Changeset detected

Latest commit: 120ae52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@medusajs/medusa-cli Patch
create-medusa-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Sep 8, 2023 8:12am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Sep 8, 2023 8:12am

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 5450221

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 5450221

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 46e224d

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 9781089

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: b717767

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 5890d3b

packages/create-medusa-app/src/utils/clone-repo.ts Outdated Show resolved Hide resolved
packages/create-medusa-app/src/utils/nextjs-utils.ts Outdated Show resolved Hide resolved
@shahednasser
Copy link
Member Author

/snapshot-this

@vercel vercel bot temporarily deployed to Preview – api-reference September 8, 2023 07:38 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 8, 2023 07:41 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: aecae57

@shahednasser
Copy link
Member Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: aecae57

@olivermrbl olivermrbl merged commit 240b038 into develop Sep 8, 2023
@olivermrbl olivermrbl deleted the feat/cma-nextjs branch September 8, 2023 10:17
@github-actions github-actions bot mentioned this pull request Sep 8, 2023
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