Skip to main content

Transparent Vite + pnpm orchestration for Sphinx theme asset pipelines

Project description

gp-sphinx-vite

Transparent Vite + pnpm orchestration for Sphinx theme asset pipelines.

A Sphinx extension that spawns pnpm exec vite build --watch from builder-inited so theme authors iterating templates and SCSS get fresh furo.css / furo.js on disk without remembering a separate vite build command. The extension is a no-op in production (when sphinx-build runs without the autobuild driver), so wheels published to PyPI never carry a Node runtime requirement.

Status

Skeleton — only setup() and config-value registration are wired up. Subprocess management (ViteProcess), the asyncio↔threading bridge, and the actual spawn/teardown lifecycle (with signal handling and idempotent re-spawn for sphinx-autobuild) land in subsequent commits.

Usage (eventual)

# conf.py
extensions = ["gp_sphinx_vite"]

# Optional. Defaults to "auto": dev iff SPHINX_AUTOBUILD env var is set
# or sys.argv[0] ends with "sphinx-autobuild"; prod (no-op) otherwise.
gp_sphinx_vite_mode = "auto"

# Optional. Path to the directory containing package.json + vite.config.ts.
# Defaults to <theme directory>/web (resolved relative to the active theme).
gp_sphinx_vite_root = None

Config

Name Type Default
gp_sphinx_vite_mode Literal["auto", "dev", "prod"] "auto"
gp_sphinx_vite_root str | None None (auto-detect)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gp_sphinx_vite-0.0.1a16.dev0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gp_sphinx_vite-0.0.1a16.dev0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file gp_sphinx_vite-0.0.1a16.dev0.tar.gz.

File metadata

  • Download URL: gp_sphinx_vite-0.0.1a16.dev0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gp_sphinx_vite-0.0.1a16.dev0.tar.gz
Algorithm Hash digest
SHA256 273e4b281d3b86a5067a9eabbda21885cad7b562ccd9272f72aa9e22bb7df657
MD5 3ad2176c6cfd52068f97ce46e4c96b9a
BLAKE2b-256 2eb28ad13ab9fe5cb7817c110966314a9fc7729f8b0c3ec3975113e45865f1cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gp_sphinx_vite-0.0.1a16.dev0.tar.gz:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gp_sphinx_vite-0.0.1a16.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for gp_sphinx_vite-0.0.1a16.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 262272ca9d670f44cb7715688397a252803ae510b0bc16a333088528e1fcbff3
MD5 bf647d6d3e5ef397f2c68fd2c65abbc0
BLAKE2b-256 14080eb6e11f0266440ceb50e86dde532db8f656f8bb48a2332b7a0e8daea65c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gp_sphinx_vite-0.0.1a16.dev0-py3-none-any.whl:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page