Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 100 additions & 4 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,109 @@ import { defineConfig } from 'vitepress';
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Vite+',
description: 'Vite+',
description: 'The Unified Toolchain for the Web',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [{ text: 'Home', link: '/' }],
nav: [
{ text: 'Home', link: '/' },
{ text: 'Get Started', link: '/guide/' },
{
text: 'Resources',
items: [
{ text: 'Team', link: 'https://voidzero.dev/team' },
{ text: 'Blog', link: 'https://voidzero.dev/blog' },
{ text: 'Releases', link: 'https://github.com/voidzero-dev/vite-plus/releases' },
Comment thread
fengmk2 marked this conversation as resolved.
{
items: [
{
text: 'Awesome Vite+',
link: 'https://github.com/voidzero-dev/awesome-vite-plus',
},
{
text: 'ViteConf',
link: 'https://viteconf.org',
},
{
text: 'DEV Community',
link: 'https://dev.to/t/vite',
},
{
text: 'Changelog',
link: 'https://github.com/voidzero-dev/vite-plus/releases',
Comment thread
fengmk2 marked this conversation as resolved.
},
Comment thread
fengmk2 marked this conversation as resolved.
{
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.
text: 'Contributing',
link: 'https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md',
},
Comment thread
fengmk2 marked this conversation as resolved.
],
},
],
},
],

sidebar: [],
sidebar: {
'/guide/': [
{
text: 'Introduction',
items: [
{
text: 'Getting Started',
link: '/guide/',
},
],
},
{
text: 'Guide',
items: [
{
text: 'Features',
link: '/guide/features',
},
{
text: 'Monorepo',
link: '/guide/monorepo',
},
{
text: 'Testing',
link: '/guide/testing',
},
{
text: 'Linting',
link: '/guide/linting',
},
{
text: 'Formatting',
link: '/guide/formatting',
},
{
text: 'Caching',
link: '/guide/caching',
},
{
text: 'CLI',
link: '/guide/cli',
},
Comment thread
fengmk2 marked this conversation as resolved.
],
},
Comment thread
fengmk2 marked this conversation as resolved.
],
'/config/': [
{
text: 'Config',
items: [
{
text: 'Configuring Vite+',
link: '/config/',
},
],
},
],
'/changes/': [],
},

socialLinks: [],
socialLinks: [
{ icon: 'github', link: 'https://github.com/voidzero-dev/vite-plus' },
{ icon: 'x', link: 'https://x.com/voidzerodev' },
{ icon: 'bluesky', link: 'https://bsky.app/profile/voidzero.dev' },
],
},
});
Empty file added docs/config/index.md
Empty file.
Empty file added docs/guide/caching.md
Empty file.
151 changes: 151 additions & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Getting Started

## Overview

Vite+ is a unified toolchain for modern web development that extends Vite with powerful monorepo capabilities. It combines:

- **Dev Server**: Vite's blazing-fast development experience with native ES modules and instant HMR
- **Build Tool**: Optimized production builds powered by Rolldown
- **Task Runner**: Intelligent monorepo task execution with caching and dependency resolution
- **Testing**: Built-in test runner with workspace support
- **Linting**: Integrated oxlint for fast code quality checks
- **Formatting**: Integrated oxfmt for consistent code formatting
- **Code Generation**: Scaffolding for new projects and monorepo workspaces
- **Dependency Management**: Integrated dependency management with pnpm, yarn, npm and bun(coming soon)
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.

All in a single, cohesive tool designed for scale, speed, and developer sanity.

## Installation

### Global CLI

Add the following to your `~/.npmrc`:

```ini
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@voidzero-dev:registry=https://npm.pkg.github.com/
```

Create a [classic personal access token](https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries) and install the global CLI:

```bash
GITHUB_TOKEN=<your-token> npm install -g @voidzero-dev/global
```

Using 1Password CLI:

```bash
GITHUB_TOKEN=$(op read "op://YOUR_GITHUB_TOKEN_PATH") npm install -g @voidzero-dev/global
```

## Scaffolding Your First Vite+ Project

Create a Vite+ project:

```bash
vite gen
```

Follow the prompts to select your preferred framework and configuration.

## Core Commands

Vite+ provides built-in commands that work seamlessly in both single-package and monorepo setups:

```bash
# Development
vite dev # Start dev server

# Build
vite build # Build for production

# Test
vite test # Run tests

# Lint
vite lint # Lint code with oxlint
Comment thread
fengmk2 marked this conversation as resolved.
```

## Monorepo Task Execution

Vite+ includes a powerful task runner for managing tasks across monorepo packages:

### Run tasks recursively

```bash
vite run build -r # Build all packages with topological ordering
vite run test -r # Test all packages
```

### Run tasks for specific packages

```bash
vite run app#build web#build # Build specific packages
vite run @scope/*#test # Test all packages matching pattern
```

### Current package

```bash
vite dev # Run dev script in current package
```

## Task Dependencies

Tasks automatically respect dependencies:

1. **Explicit dependencies** - Defined in `vite-task.json`:

```json
{
"tasks": {
"test": {
"command": "jest",
"dependsOn": ["build", "lint"]
}
}
}
```

2. **Implicit dependencies** - Based on `package.json` relationships when using `--topological` (default for `-r`):
- If package A depends on package B, then `A#build` automatically depends on `B#build`

Disable topological ordering:

```bash
vite run build -r --no-topological
```

## Intelligent Caching

Vite+ caches task outputs to speed up repeated builds:

- Automatically detects when inputs change
- Skips tasks when outputs are cached
- Shares cache across team members (when configured)

View cache operations:

```bash
vite run build -r --debug
```

## Next Steps

- Learn more about [task configuration](/guide/tasks)
- Explore [caching strategies](/guide/caching)
- Set up [monorepo workspaces](/guide/monorepo)
- Customize [Vite+ configuration](/config/)
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.

## Community & Support

Get help and stay updated:

- [GitHub Issues](https://github.com/voidzero-dev/vite-plus/issues)
- [GitHub Discussions](https://github.com/voidzero-dev/vite-plus/discussions)

---

::: tip Requirements
Vite+ requires Node.js 20.19+, 22.12+ or 24.12+
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.
:::
Empty file added docs/guide/monorepo.md
Empty file.
Empty file added docs/guide/tasks.md
Empty file.
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ layout: home

hero:
name: "Vite+"
text: "Vite+"
tagline: My great project tagline
text: "The Unified Toolchain for the Web"
tagline: "dev, build, test, lint, format, monorepo caching & more in a single dependency, build for scale, speed, and sanity"
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.
actions:
- theme: brand
text: AAA
link: /
text: Get Started
link: /guide/
- theme: alt
text: BBB
link: /
text: GitHub
link: https://github.com/voidzero-dev/vite-plus

features:
- title: Feature A
Expand Down
5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"private": true,
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
"build": "vite doc build",
"preview": "vite doc preview"
},
"devDependencies": {
"@voidzero-dev/vite-plus": "workspace:*",
"vue": "catalog:",
"vitepress": "catalog:",
"oxc-minify": "catalog:"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"lint": "vite lint --type-aware --threads 4",
"test": "vite test run && pnpm -r snap-test",
"test:unit": "vite test run",
"docs:dev": "vite run vite-docs#dev",
"prepare": "husky"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading