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(cli): monorepo changes required to run create-catalyst CLI #457

Merged
merged 7 commits into from
Jan 31, 2024

Conversation

matthewvolk
Copy link
Contributor

@matthewvolk matthewvolk commented Jan 30, 2024

What/Why?

  • References to cn in Reactant must be through tsconfig paths. This allows components to be copied over into apps/core without needing to modify cn references.
  • Adds dotenv-cli to apps/core so that codegen and dev-codegen package scripts can be run outside of the monorepo.
  • Add tsconfig path in apps/core to map references to @bigcommerce/reactant/* to ./node_modules/@bigcommerce/reactant/*. When the create-catalyst CLI creates the new project tsconfig, this path is mapped to ./components/ui/* where the Reactant components are copied into.
  • Similarly, add tsconfig path in packages/reactant to allow references to cn inside packages/reactant to be the same as references to cn from within apps/core.
  • apps/core/userAgent.ts cannot reference monorepo package.json outside of the monorepo.
  • Reconcile differences between packages/reactant/.eslintrc.cjs and apps/core/.eslintrc.cjs so that we can have a single .eslintrc.cjs to use while Catalyst is running outside of the monorepo.
  • Reconcile differences between packages/reactant/tailwind.config.js and apps/core/tailwind.config.js so that we can have a single tailwind.config.js to use while Catalyst is running outside of the monorepo.

Testing

https://bigcommerce.slack.com/archives/C056HLZC36W/p1706286802069659?thread_ts=1706213429.702309&cid=C056HLZC36W

@matthewvolk matthewvolk requested a review from a team January 30, 2024 17:27
Copy link

vercel bot commented Jan 30, 2024

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

Name Status Preview Comments Updated (UTC)
catalyst ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 5:28pm
catalyst-1millionproducts-store ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 5:28pm
catalyst-core-kynz ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 5:28pm
catalyst-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2024 5:28pm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this, building storybook crashes with an error:

Error: [vite]: Rollup failed to resolve import "~/lib/utils" from "catalyst/packages/reactant/src/components/Input/Input.tsx".

Copy link
Contributor

⚡️🏠 Lighthouse report

We ran Lighthouse against the changes and produced this report. Here's the summary:

Category Score
🟢 Performance 93
🟢 Accessibility 91
🟢 Best practices 92
🟢 SEO 92

Lighthouse ran against https://catalyst-rnz602pym-bigcommerce-platform.vercel.app/

@matthewvolk matthewvolk added this pull request to the merge queue Jan 31, 2024
Merged via the queue into main with commit bd56223 Jan 31, 2024
12 of 15 checks passed
@matthewvolk matthewvolk deleted the create-catalyst-template branch January 31, 2024 17:26
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