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(medusa): seed command can create product categories #3528

Merged
merged 4 commits into from
Mar 20, 2023

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Mar 20, 2023

What:

  • The medusa seed command can create nested product categories

RESOLVES CORE-1274

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2023

🦋 Changeset detected

Latest commit: 4065477

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

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

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 Mar 20, 2023

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

Name Status Preview Comments Updated
medusa-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 20, 2023 at 5:39PM (UTC)

@riqwan riqwan marked this pull request as ready for review March 20, 2023 15:30
@riqwan riqwan requested a review from a team as a code owner March 20, 2023 15:30
Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -202,6 +210,33 @@ const seed = async function ({ directory, migrate, seedFile }: SeedOptions) {
}
}
}

const createProductCategory = async (
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Nice one @riqwan - should we add some categories to our seed data in the starter?

Copy link
Contributor Author

@riqwan riqwan Mar 20, 2023

Choose a reason for hiding this comment

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

I've added to the staging repo - https://github.com/medusajs/medusa-staging/pull/20

Should we add the same thing in there or skim it down? I think this might be too much for the starter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Holy smokes - this is super nice!

Though, maybe skim it down to 5-6 categories with a couple of children each?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, power of writing a script and some scraping. :D

I'll add a skimmed version to the starter.

@riqwan riqwan merged commit 98cad6d into develop Mar 20, 2023
@riqwan riqwan deleted the feat/medusa-seed-categories branch March 20, 2023 18:08
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.

3 participants