Skip to content

feat(dev): simplify local dev workflow#1102

Open
Salnika wants to merge 4 commits intovoidzero-dev:mainfrom
Salnika:fix/bootrap-cli
Open

feat(dev): simplify local dev workflow#1102
Salnika wants to merge 4 commits intovoidzero-dev:mainfrom
Salnika:fix/bootrap-cli

Conversation

@Salnika
Copy link
Contributor

@Salnika Salnika commented Mar 22, 2026

Summary

This PR simplifies local development of the CLI.

It adds a repo-local setup and bootstrap flow so a fresh clone can be prepared with:

pnpm install:dev
pnpm bootstrap:dev

It also keeps bootstrap-cli for the global install flow.

What changed

  • added pnpm install:dev to prepare local upstream checkouts and install dependencies
  • added pnpm bootstrap:dev to prepare the repo and build the local CLI
  • updated local CLI and test scripts to use repo-local artifacts
  • updated global snap test execution to use the repo-local binary instead of relying on ~/.vite-plus
  • updated just init and contributor docs to reflect the new workflow

Why

The local development workflow required extra manual setup before the CLI could be built and tested.

This PR makes the common development path more direct while keeping the existing global install flow available.

@netlify
Copy link

netlify bot commented Mar 22, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit b47b351
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69c590252113b20008206240

@fengmk2
Copy link
Member

fengmk2 commented Mar 23, 2026

@Salnika Thanks, look good. I will take a try before merge.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR streamlines the repo’s local CLI development workflow by introducing repo-local install/bootstrap scripts, building/using local CLI artifacts by default, and isolating snap tests from ~/.vite-plus state.

Changes:

  • Added pnpm install:dev / pnpm bootstrap:dev flows to prepare upstream checkouts, install deps, and build the local CLI.
  • Switched tests and global snap tests to use repo-local artifacts (including a temp VITE_PLUS_HOME) instead of ~/.vite-plus.
  • Updated just init and contributor docs to reflect the new local-dev-first workflow.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/setup-local-dev.mjs New repo-local setup script that clones/syncs upstream checkouts and runs pnpm install.
pnpm-lock.yaml Adds workspace link resolution for rolldown (lockfile update).
packages/tools/src/snap-test.ts Uses a temp VITE_PLUS_HOME under the test temp dir for stability and isolation.
packages/tools/src/local-cli.ts New tooling entrypoints for building and running repo-local CLI + local global snap tests.
packages/tools/src/index.ts Registers new tool subcommands (build-local-cli, local-cli, snap-test-global-local).
packages/prompts/package.json Adds rolldown as a devDependency (workspace).
packages/cli/package.json Routes test and global snap tests through the repo-local tool entrypoints.
package.json Adds install:dev, bootstrap:dev, build:cli, and updates test/bootstrap scripts to use local flow.
justfile Updates just init to delegate to pnpm install:dev.
CONTRIBUTING.md Documents the new local CLI workflow and updated initialization guidance.
CLAUDE.md Updates build/snap-test guidance to emphasize repo-local artifacts.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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