This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file provides guidance to coding agents working in this repository.
## Guidelines
- Do not commit changes automatically. Wait for an explicit user request to commit.
- Keep `dist/index.mjs` in sync with source changes by running `vp run build` before committing.
## Project Overview
GitHub Action to set up [Vite+](https://viteplus.dev) (`vp`) with dependency caching support. The action installs Vite+ globally, can set up Node.js via `vp env use`, optionally configures registry auth, restores/saves dependency cache, and can run `vp install` with optional Socket Firewall Free (`sfw`) wrapping.
## Commands
```bash
# Build (required before committing - outputs to dist/)
vp run build
# Type check
vp run typecheck
# Run tests
vp run test
# Run tests in watch mode
vp run test:watch
# Check (lint + format)
vp run check
vp run check:fix
```
**Important:** Always run `vp run check:fix` and `vp run build` before committing. The compiled `dist/index.mjs` must be committed when source changes affect the action bundle.
## Architecture
The action has main and post execution phases. Both are served by `src/index.ts` / `dist/index.mjs`; the phase is selected from GitHub Actions runtime state.
- **Main phase** (`runMain`):
1. Parse and validate inputs.
2. Install Vite+ globally via official bash/PowerShell install scripts.
3. Set up Node.js with `vp env use` when requested.
4. Configure registry auth from `registry-url`, or propagate auth from the project `.npmrc`.
5. Restore dependency cache when enabled.
6. Run `vp install` when requested, optionally wrapped with `sfw`.
- **Post phase** (`runPost`):
1. Save dependency cache when enabled.
### Key Modules
- `src/index.ts` - Main/post orchestration and action state handling.
- `src/inputs.ts` - Parse and validate action inputs using Zod schemas.
- `src/types.ts` - Shared types, enums, and Zod schemas.
- `src/install-viteplus.ts` - Install Vite+ globally via official install scripts.
- `src/node-version-file.ts` - Resolve Node.js versions from supported version files.
- `src/auth.ts` - Configure npm registry authentication from action inputs and repo `.npmrc`.
- `src/cache-restore.ts` / `src/cache-save.ts` - Dependency caching via `@actions/cache`.
- `src/run-install.ts` - Execute `vp install` entries with optional cwd/args.
- `src/install-sfw.ts` - Install or reuse Socket Firewall Free for wrapped installs.
Tests are colocated with source files (for example, `src/inputs.test.ts`). Run `vp run test` for test coverage, then run `vp run check:fix` and `vp run build` before committing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Guidelines
- Do not commit changes automatically. Wait for explicit user request to commit.
## Project Overview
GitHub Action to set up [Vite+](https://github.com/voidzero-dev/vite-plus) (`vp`) with dependency caching support. This action installs Vite+ globally via official install scripts and optionally caches project dependencies based on lock file detection.
## Commands
```bash
# Build (required before committing - outputs to dist/)
vp run build
# Type check
vp run typecheck
# Run tests
vp run test
# Run tests in watch mode
vp run test:watch
# Check (lint + format)
vp run check
vp run check:fix
```
**Important:** Always run `vp run check:fix` and `vp run build` before committing - the `dist/index.mjs` must be committed.
## Architecture
This is a GitHub Action with main and post execution phases (defined in `action.yml`):
- **Main phase** (`src/index.ts` → `runMain`):
1. Install Vite+ globally via bash/PowerShell install scripts
2. Set up Node.js version via `vp env use` if specified
3. Restore dependency cache if enabled
4. Run `vp install` if requested
- **Post phase** (`src/index.ts` → `runPost`):
1. Save dependency cache if enabled
### Key Modules
- `src/inputs.ts` - Parse and validate action inputs using Zod schemas
- `src/install-viteplus.ts` - Install Vite+ globally via official install scripts
- `src/cache-restore.ts` / `src/cache-save.ts` - Dependency caching via `@actions/cache`
- `src/run-install.ts` - Execute `vp install` with optional cwd/args
- `src/types.ts` - Shared types, enums, and Zod schemas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs: update shared agent guidance #89
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
Uh oh!
There was an error while loading. Please reload this page.
docs: update shared agent guidance #89
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.