vite-plus README

README проекта с github.com/voidzero-dev/vite-plus. Одним файлом markdown: README.md.

Vite+ Vite+

The Unified Toolchain for the Web runtime and package management, create, dev, check, test, build, pack, and monorepo task caching in a single dependency


Vite+ is the unified entry point for local web development. It combines Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown, and Vite Task into one zero-config toolchain that also manages runtime and package manager workflows:

All of this is configured from your project root and works across Vite's framework ecosystem. Vite+ is fully open-source under the MIT license.

Getting Started

Install Vite+ globally as vp:

For Linux or macOS:

curl -fsSL https://vite.plus | bash

For Windows:

irm https://viteplus.dev/install.ps1 | iex

vp handles the full development lifecycle such as package management, development servers, linting, formatting, testing and building for production.

Configuring Vite+

Vite+ can be configured using a single vite.config.ts at the root of your project:

import { defineConfig } from 'vite-plus';

export default defineConfig({
  // Standard Vite configuration for dev/build/preview.
  plugins: [],

  // Vitest configuration.
  test: {
    include: ['src/**/*.test.ts'],
  },

  // Oxlint configuration.
  lint: {
    ignorePatterns: ['dist/**'],
  },

  // Oxfmt configuration.
  fmt: {
    semi: true,
    singleQuote: true,
  },

  // Vite Task configuration.
  run: {
    tasks: {
      'generate:icons': {
        command: 'node scripts/generate-icons.js',
        cache: {
          env: ['ICON_THEME'],
        },
      },
    },
  },

  // `vp staged` configuration.
  staged: {
    '*': 'vp check --fix',
  },
});

This lets you keep the configuration for your development server, build, test, lint, format, task runner, and staged-file workflow in one place with type-safe config and shared defaults.

Use vp migrate to migrate to Vite+. It merges tool-specific config files such as .oxlintrc*, .oxfmtrc*, and lint-staged config into vite.config.ts.

CLI Workflows (vp help)

Start

Develop

Execute

Build

Manage Dependencies

Vite+ automatically wraps your package manager (pnpm, npm, Yarn, or Bun) based on packageManager and lockfiles:

Maintain

Scaffolding your first Vite+ project

Use vp create to create a new project:

vp create

You can run vp create inside of a project to add new apps or libraries to your project.

Organizations can expose a curated set of templates under their npm scope by publishing @org/create with a createConfig.templates manifest in its package.json. Once published, vp create @org opens an interactive picker over those templates, and setting create: { defaultTemplate: '@org' } in vite.config.ts makes it the default for bare vp create. See the Organization Templates guide for the authoring workflow and create.defaultTemplate for the config reference.

Migrating an existing project

You can migrate an existing project to Vite+:

vp migrate

GitHub Actions

Use the official setup-vp action to install Vite+ in GitHub Actions:

- uses: voidzero-dev/setup-vp@<setup-vp-version>
  with:
    node-version: '22'
    cache: true

Set <setup-vp-version> to an exact version from the setup-vp releases page. You can use a commit SHA instead. Do not use the v1 tag. The v1 tag no longer receives updates.

See Automatic Version Updates to configure Dependabot or Renovate.

Manual Installation & Migration

If you are manually migrating a project to Vite+, install these dev dependencies first:

vp install -D vite-plus

Add package-manager overrides so that other packages use the Vite+ versions. Alias vite to @voidzero-dev/vite-plus-core, setting <core-version> to the core version that the installed vite-plus uses, shown by vp toolchain vite-plus-core. The core version encodes the bundled Vite version (for example, 8.3.5000 for Vite 8.3.5), so package managers check vite peer ranges against the bundled Vite. Pin vitest to <vitest-version>, using the bundled version shown by vp toolchain vitest. The project and vp test then use the same Vitest copy. Without the pin, a dependency or workspace package can install a different Vitest version. The two versions can use separate mocks, expect functions, and runner states:

"overrides": {
  "vite": "npm:@voidzero-dev/vite-plus-core@<core-version>",
  "vitest": "<vitest-version>"
}

If you are using pnpm, add this to your pnpm-workspace.yaml:

overrides:
  vite@*: npm:@voidzero-dev/vite-plus-core@<core-version> # Match the version from vp toolchain vite-plus-core
  vitest@*: <vitest-version> # Match the version from vp toolchain vitest

Or, if you are using Yarn:

"resolutions": {
  "vite": "npm:@voidzero-dev/vite-plus-core@<core-version>",
  "vitest": "<vitest-version>"
}

Sponsors

Thanks to namespace.so for powering our CI/CD pipelines with fast, free macOS, Linux, and Windows runners.

vite-plus (voidzero-dev/vite-plus)

Ищем в базе…

Что это такое?Vite+ — это единый набор инструментов и точка входа для веб-разработки: один CLI (vp) без конфигурации, который объединяет Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown и средство запуска задач, а также управляет вашей средой выполнения Node.js и менеджером пакетов.
Это фреймворк или просто CLI-обёртка над другими инструментами?Это CLI-инструмент (бинарный файл vp), который оборачивает существующие инструменты (Vite, Vitest, Oxlint, Oxfmt, Rolldown, tsdown) и управляет ими, а не фреймворк, для которого вы пишете код.
Как запустить vp?Установите Vite+ глобально: для Linux/macOS и для Windows используются разные команды. После этого у вас появится CLI vp для разработки, сборки, тестирования, линтинга и другого.
Нужно ли сначала самому установить Node.js и менеджер пакетов?Нет, vp env сам управляет Node.js и менеджерами пакетов, а vp автоматически оборачивает тот менеджер пакетов, который использует ваш проект (pnpm, npm, Yarn или Bun), определяя его по полю packageManager и файлам блокировки.
Есть ли подводные камни при ручном переносе существующего проекта вместо использования vp migrate?Нужно задать алиас vite на @voidzero-dev/vite-plus-core и зафиксировать vitest в точной версии, которую включает Vite+ (её показывает vp toolchain vitest). Иначе какая-нибудь зависимость может подтянуть другую копию Vitest с отдельными моками, функциями expect и состоянием раннера, что приведёт к трудноуловимым ошибкам в тестах.
Как настроить все эти инструменты сразу?Всё хранится в одном файле vite.config.ts в корне проекта. Это даёт типобезопасную общую конфигурацию для сервера разработки, сборки, тестов, линтинга, форматирования, средства запуска задач и рабочего процесса для проиндексированных файлов.
Как перенести существующий проект на Vite+?Выполните vp migrate: он объединит файлы конфигурации отдельных инструментов, такие как .oxlintrc, .oxfmtrc и конфигурацию lint-staged, в один файл vite.config.ts.
Как создать новый проект с нуля?Используйте vp create, чтобы выбрать шаблон. Организации также могут публиковать собственные шаблоны в npm-области (например, @org/create) и открывать их через vp create @org.
Можно ли использовать Vite+ в CI/CD?Да, официальное действие GitHub Action setup-vp устанавливает Vite+ в GitHub Actions. Его стоит закрепить за точной версией или коммитом SHA, так как тег v1 больше не получает обновлений.
Какие есть похожие проекты?oxc, nub, closure-compiler, bun, nx, woocommerce, rolldown, pnpm
Автор
voidzero-dev
Размер
40.1 MB
Звёзды
6.6K
Возраст
1 г
Коммиты · 90 дней