Skip to content

feat(cli): monorepo changes required to run create-catalyst CLI#457

Merged
matthewvolk merged 7 commits intomainfrom
create-catalyst-template
Jan 31, 2024
Merged

feat(cli): monorepo changes required to run create-catalyst CLI#457
matthewvolk merged 7 commits intomainfrom
create-catalyst-template

Conversation

@matthewvolk
Copy link
Copy Markdown
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
@vercel
Copy link
Copy Markdown

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

Comment thread apps/core/userAgent.ts Outdated
Comment thread apps/docs/vite.config.js Outdated
Copy link
Copy Markdown
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".

@matthewvolk matthewvolk force-pushed the create-catalyst-template branch from d082955 to 05b497b Compare January 31, 2024 17:13
@github-actions
Copy link
Copy Markdown
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
@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