Skip to content

feat(cli): add dev command#2498

Merged
jorgemoya merged 7 commits intocanaryfrom
cli-dev
Aug 1, 2025
Merged

feat(cli): add dev command#2498
jorgemoya merged 7 commits intocanaryfrom
cli-dev

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

@jorgemoya jorgemoya commented Jul 24, 2025

What/Why?

This is just a wrapper for the dev command in the core/package.json. Allows changing port and root directory.

Independently of the framework chosen, it will just run next dev behind the scenes.

Testing

Locally it runs.

Not sure how to unit test this, any ideas? 🤔

Migration

N/A

@jorgemoya jorgemoya requested a review from a team July 24, 2025 22:10
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jul 24, 2025

⚠️ No Changeset found

Latest commit: 6822041

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 24, 2025

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

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 3:46pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Aug 1, 2025 3:46pm
catalyst-au ⬜️ Ignored (Inspect) Aug 1, 2025 3:46pm
catalyst-b2b ⬜️ Ignored (Inspect) Aug 1, 2025 3:46pm
catalyst-uk ⬜️ Ignored (Inspect) Aug 1, 2025 3:46pm

Comment thread packages/cli/src/commands/dev.ts Outdated
.option('--root-dir <rootDir>', 'Root directory to run development server from.', process.cwd())
.action(async (opts) => {
try {
await execa('npm', ['run', 'dev'], { stdio: 'inherit', cwd: opts.rootDir });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this command should look for the local next binary in node_modules to run. What do you think?

Copy link
Copy Markdown
Contributor Author

@jorgemoya jorgemoya Jul 24, 2025

Choose a reason for hiding this comment

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

If so, I assume we should also run the generate script before running dev?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmmm yeah

we probably want to abstract that generate script out at some point too 🤔

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.

Updated 👍

Copy link
Copy Markdown
Contributor

@jordanarldt jordanarldt left a comment

Choose a reason for hiding this comment

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

Seems pretty straightforward. LGTM

@jorgemoya jorgemoya enabled auto-merge August 1, 2025 15:45
@jorgemoya jorgemoya added this pull request to the merge queue Aug 1, 2025
Merged via the queue into canary with commit 071b7f5 Aug 1, 2025
12 checks passed
@jorgemoya jorgemoya deleted the cli-dev branch August 1, 2025 15:48
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