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.1a15.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.1a15-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file gp_sphinx_vite-0.0.1a15.tar.gz.

File metadata

  • Download URL: gp_sphinx_vite-0.0.1a15.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.1a15.tar.gz
Algorithm Hash digest
SHA256 316ddfc3bb27da408a2b39feb24393af85f397a8d95e8b60ef3c3e2e87a813fe
MD5 a594e7104d43a8c4c3f17b97d5576565
BLAKE2b-256 1fcb534af993829fd7e9f177b2d5e548cd336bd7c686f9d5bb026afd60b2ec8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gp_sphinx_vite-0.0.1a15.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.1a15-py3-none-any.whl.

File metadata

File hashes

Hashes for gp_sphinx_vite-0.0.1a15-py3-none-any.whl
Algorithm Hash digest
SHA256 7d460dd1eecc657c6b509ec0f232aa8af33f7c2c755f42b0e8c021a64d530186
MD5 580f97260f2524efcabd09d48373dc95
BLAKE2b-256 44b841f913dd340054e8b4220fb9bb05ae23f4dd74d42f2705be642a0ac729a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gp_sphinx_vite-0.0.1a15-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