Skip to content

Commit ad5b716

Browse files
committed
[Docs] Enhance README(s) with logo and better text
1 parent 1e1d7c8 commit ad5b716

4 files changed

Lines changed: 98 additions & 6 deletions

File tree

README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
1-
# Symfony Reprise
1+
<h1 align="center">
2+
<img src="doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="top"> Symfony Reprise
3+
</h1>
24

3-
[![npm version](https://img.shields.io/npm/v/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
4-
[![npm downloads](https://img.shields.io/npm/dm/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
5-
[![license](https://img.shields.io/npm/l/@symfony%2Freprise?color=crimson&label=)](https://www.npmjs.com/package/@symfony/reprise)
5+
<p align="center">
6+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/v/@symfony%2Freprise?color=crimson&label=" alt="npm version"></a>
7+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/dm/@symfony%2Freprise?color=crimson&label=" alt="npm downloads"></a>
8+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/l/@symfony%2Freprise?color=crimson&label=" alt="license"></a>
9+
</p>
610

7-
**EXPERIMENTAL** This bundle is experimental and is likely to change, or even change drastically.
11+
<p align="center">
12+
<a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/v/symfony/reprise?color=crimson&label=" alt="Packagist version"></a>
13+
<a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/dm/symfony/reprise?color=crimson&label=" alt="Packagist downloads"></a>
14+
<a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/php-v/symfony/reprise?color=crimson&label=php" alt="PHP version"></a>
15+
</p>
816

9-
Webpack Encore gave Symfony first-class asset integration for Webpack. Symfony Reprise gives you the same integration for **Vite** and **Rsbuild**.
17+
<p align="center">
18+
Webpack Encore gave Symfony first-class asset integration for Webpack.<br>
19+
Symfony Reprise brings the same to <strong>Vite</strong> and <strong>Rsbuild</strong>.
20+
</p>
21+
22+
> [!WARNING]
23+
> **Experimental** this bundle is experimental and is likely to change, or even change drastically.
24+
25+
Symfony Reprise covers only the Symfony-side glue the bundlers leave out:
26+
27+
- 🎯 **Multiple entries**: build several independent entry points from one config
28+
- 📄 **`entrypoints.json`**: generated in both build and dev-server modes
29+
- 🗺️ **`manifest.json`**: maps each logical filename to its hashed URL
30+
- 🔖 **Asset versioning**: content-hash cache busting, wired into the manifest
31+
- 🔥 **Dev server & HMR**: points Twig at the running Vite/Rsbuild server
32+
- 🧩 **Symfony UX / Stimulus**: registers `controllers.json` and local controllers, eager or lazy
33+
- 🌐 **CDN support**: absolute `publicPath` *(planned)*
34+
- 🛡️ **Subresource Integrity**: SRI hashes in `entrypoints.json` *(planned)*
35+
- 📦 **Shared runtime chunk**: one runtime shared across entries *(planned)*
36+
37+
Vite and Rsbuild already handle **Sass/Less/PostCSS**, **TypeScript**, **JSX/Vue/Svelte**, **code splitting**, **content hashing**, **source maps**, **minification** and **HMR** on their own, so Symfony Reprise does not reimplement any of that.
38+
39+
It generates the Encore-compatible `entrypoints.json` and `manifest.json` that WebpackEncoreBundle's Twig helpers (`encore_entry_script_tags()`, `encore_entry_link_tags()`) read, wires up the native dev server, and turns your Stimulus controllers into a running application.
1040

1141
[Read the documentation](doc/index.rst)

assets/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<h1 align="center">
2+
<img src="https://raw.githubusercontent.com/symfony/reprise/main/doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="top"> @symfony/reprise
3+
</h1>
4+
5+
<p align="center">
6+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/v/@symfony%2Freprise?color=crimson&label=" alt="npm version"></a>
7+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/dm/@symfony%2Freprise?color=crimson&label=" alt="npm downloads"></a>
8+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/node/v/@symfony%2Freprise?color=crimson&label=node" alt="node version"></a>
9+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/l/@symfony%2Freprise?color=crimson&label=" alt="license"></a>
10+
</p>
11+
12+
The JavaScript half of **[Symfony Reprise](https://github.com/symfony/reprise)**: a Vite and Rsbuild plugin that generates the `entrypoints.json` and `manifest.json` the Symfony bundle reads.
13+
14+
Use it alongside the `symfony/reprise` Composer bundle. The plugin builds your assets and writes the manifests; the bundle renders the matching `<script>` and `<link>` tags from them.
15+
16+
## Installation
17+
18+
```bash
19+
npm install @symfony/reprise --save-dev
20+
```
21+
22+
## Usage
23+
24+
Vite:
25+
26+
```js
27+
// vite.config.ts
28+
import { defineConfig } from 'vite'
29+
import Symfony from '@symfony/reprise/vite'
30+
31+
export default defineConfig({
32+
plugins: [Symfony({ /* options */ })],
33+
})
34+
```
35+
36+
Rsbuild:
37+
38+
```js
39+
// rsbuild.config.ts
40+
import { defineConfig } from '@rsbuild/core'
41+
import Symfony from '@symfony/reprise/rsbuild'
42+
43+
export default defineConfig({
44+
plugins: [Symfony({ /* options */ })],
45+
})
46+
```
47+
48+
See the [full documentation](https://github.com/symfony/reprise/blob/main/doc/index.rst) for entrypoints, manifest, dev server and Stimulus setup.
49+
50+
## License
51+
52+
[MIT](./LICENSE)

assets/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"files": [
4747
"dist"
4848
],
49+
"engines": {
50+
"node": ">=22.18"
51+
},
4952
"scripts": {
5053
"build": "tsdown",
5154
"dev": "tsdown -w",

doc/symfony-reprise.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)