### Install dependencies Source: https://github.com/symfony/reprise/blob/main/CONTRIBUTING.md Install PHP and JavaScript dependencies using Composer and pnpm. ```shell $ composer install $ pnpm install ``` -------------------------------- ### entrypoints.json example Source: https://github.com/symfony/reprise/blob/main/AGENTS.md Example of the entrypoints.json file structure mapping entry names to asset URLs grouped by type, with optional integrity section for SRI hashes. ```json { "entrypoints": { "app": { "js": ["/build/runtime.js", "/build/app.js"], "css": ["/build/app.css"] } } } ``` -------------------------------- ### Install @symfony/reprise with npm Source: https://github.com/symfony/reprise/blob/main/assets/README.md Install the package as a dev dependency using npm. ```bash npm install @symfony/reprise --save-dev ``` -------------------------------- ### Install Symfony Reprise with Composer Source: https://github.com/symfony/reprise/blob/main/doc/index.rst Install the Symfony Reprise bundle using Composer and Symfony Flex. ```terminal $ composer require symfony/reprise ``` -------------------------------- ### Example commit messages Source: https://github.com/symfony/reprise/blob/main/CONTRIBUTING.md Examples of commit messages following the [] convention. ```text [Stimulus] Emit forward-slash local controller paths [Docs] Frame Stimulus usage as the Encore experience [CI] Cancel superseded runs with a concurrency group ``` -------------------------------- ### Start Stimulus App with Reprise Source: https://github.com/symfony/reprise/blob/main/doc/index.rst Imports and starts the Stimulus application using Reprise's startStimulusApp() function. This is the entry point for using Stimulus with Reprise. ```javascript import { startStimulusApp } from '@symfony/reprise/stimulus' const app = startStimulusApp() ``` -------------------------------- ### Run Vite dev server in playground Source: https://github.com/symfony/reprise/blob/main/AGENTS.md Starts the Vite development server for the playground Symfony app. Run from the playground directory. ```bash npm -C playground run vite:dev ``` -------------------------------- ### Run Rsbuild dev server in playground Source: https://github.com/symfony/reprise/blob/main/AGENTS.md Starts the Rsbuild development server for the playground Symfony app. Run from the playground directory. ```bash npm -C playground run rsbuild:dev ``` -------------------------------- ### Install Stimulus and UX Leaflet Map Source: https://github.com/symfony/reprise/blob/main/doc/index.rst Command to install required packages for using Stimulus and UX Leaflet Map with Reprise. ```terminal $ npm install @hotwired/stimulus @symfony/ux-leaflet-map ``` -------------------------------- ### Update main branch Source: https://github.com/symfony/reprise/blob/main/MAINTAINERS.md Start from an up-to-date main branch before cutting a release. ```bash git checkout main git pull upstream main ``` -------------------------------- ### Local Controller with Lazy Loading Comment Source: https://github.com/symfony/reprise/blob/main/doc/index.rst Example of a local controller file that uses a stimulusFetch: 'lazy' comment to load on demand. The comment can be a block or single-line comment. ```javascript import { Controller } from '@hotwired/stimulus' /* stimulusFetch: 'lazy' */ export default class extends Controller {} ``` -------------------------------- ### Build, test, lint, and format assets Source: https://github.com/symfony/reprise/blob/main/CONTRIBUTING.md Commands for building the plugin, watching for changes, running tests, linting, and formatting the assets. ```shell # Build the plugin $ pnpm build # Watch and rebuild on change $ pnpm dev # Run the test suite $ pnpm test # Lint $ pnpm lint # Format (use `pnpm fmt:check` to only check, without writing) $ pnpm fmt ``` -------------------------------- ### Full reprise.yaml configuration reference Source: https://github.com/symfony/reprise/blob/main/doc/index.rst All optional settings with their default values. Includes output_path, builds, strict_mode, cache, asset_package, crossorigin, preload, script_attributes, and link_attributes. ```yaml # config/packages/reprise.yaml reprise: # Directory the @symfony/reprise plugin writes entrypoints.json and manifest.json into. # Set to false when using only named builds (requires at least one entry under builds). output_path: '%kernel.project_dir%/public/build' # Additional named builds: a map of build name -> output directory (see `Multiple builds`_). builds: {} # Throw when entrypoints.json or a requested entry is missing, instead of rendering nothing. strict_mode: true # Cache the parsed entrypoints.json in a compiled PHP file, warmed at cache:warmup (needs symfony/cache). cache: false # A framework.assets package name used to resolve entry URLs. null uses the default package. asset_package: null # crossorigin attribute set alongside SRI integrity: false, 'anonymous' or 'use-credentials'. crossorigin: false # Register rendered assets as WebLink HTTP/2 Link: preload headers (needs symfony/web-link). preload: true # Default attributes added to every rendered