Skip to content

Commit bcfde76

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

5 files changed

Lines changed: 123 additions & 20 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+
<p align="center"><a href="https://symfony.com" target="_blank">
2+
<img src="https://symfony.com/logos/symfony_dynamic_01.svg" alt="Symfony Logo">
3+
</a></p>
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+
<h3 align="center">
6+
<img src="doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="center"> Symfony Reprise: Webpack Encore's heritage, for modern bundlers
7+
</h3>
68

7-
**EXPERIMENTAL** This bundle is experimental and is likely to change, or even change drastically.
9+
<p align="center">
10+
<a href="https://github.com/symfony/reprise/releases"><img src="https://img.shields.io/github/v/tag/symfony/reprise?sort=semver&label=tag&color=crimson" alt="Latest tag"></a>
11+
<a href="https://packagist.org/packages/symfony/reprise"><img src="https://img.shields.io/packagist/php-v/symfony/reprise?label=php&color=crimson" alt="PHP version"></a>
12+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/node/v/@symfony%2Freprise?label=node&color=crimson" alt="Node version"></a>
13+
<a href="https://github.com/symfony/reprise/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/symfony/reprise/ci.yml?branch=main&label=CI" alt="CI"></a>
14+
<a href="https://github.com/symfony/reprise/blob/main/LICENSE"><img src="https://img.shields.io/github/license/symfony/reprise?label=license&color=crimson" alt="License"></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+
<a href="https://github.com/symfony/webpack-encore">Webpack Encore</a> 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](https://github.com/symfony/webpack-encore-bundle)'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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<p align="center"><a href="https://symfony.com" target="_blank">
2+
<img src="https://symfony.com/logos/symfony_dynamic_01.svg" alt="Symfony Logo">
3+
</a></p>
4+
5+
<h3 align="center">
6+
<img src="https://raw.githubusercontent.com/symfony/reprise/main/doc/symfony-reprise.svg" alt="Symfony Reprise" height="32" align="center"> Symfony Reprise: Webpack Encore's heritage, for modern bundlers
7+
</h3>
8+
9+
10+
<p align="center">
11+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/npm/v/@symfony%2Freprise?label=npm&color=crimson" alt="npm version"></a>
12+
<a href="https://www.npmjs.com/package/@symfony/reprise"><img src="https://img.shields.io/node/v/@symfony%2Freprise?label=node&color=crimson" alt="Node version"></a>
13+
<a href="https://github.com/symfony/reprise/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/symfony/reprise/ci.yml?branch=main&label=CI" alt="CI"></a>
14+
<a href="https://github.com/symfony/reprise/blob/main/assets/LICENSE"><img src="https://img.shields.io/github/license/symfony/reprise?label=license&color=crimson" alt="License"></a>
15+
</p>
16+
17+
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.
18+
19+
Use it alongside the [`symfony/reprise` Composer bundle](https://packagist.org/packages/symfony/reprise). The plugin builds your assets and writes the manifests; the bundle renders the matching `<script>` and `<link>` tags from them.
20+
21+
## Installation
22+
23+
```bash
24+
npm install @symfony/reprise --save-dev
25+
```
26+
27+
## Usage
28+
29+
Vite:
30+
31+
```js
32+
// vite.config.ts
33+
import { defineConfig } from 'vite'
34+
import Symfony from '@symfony/reprise/vite'
35+
36+
export default defineConfig({
37+
plugins: [Symfony({ /* options */ })],
38+
})
39+
```
40+
41+
Rsbuild:
42+
43+
```js
44+
// rsbuild.config.ts
45+
import { defineConfig } from '@rsbuild/core'
46+
import Symfony from '@symfony/reprise/rsbuild'
47+
48+
export default defineConfig({
49+
plugins: [Symfony({ /* options */ })],
50+
})
51+
```
52+
53+
See the [full documentation](https://github.com/symfony/reprise/blob/main/doc/index.rst) for entrypoints, manifest, dev server and Stimulus setup.
54+
55+
## License
56+
57+
[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/index.rst

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,30 @@ Symfony Reprise
55
or even change drastically.
66

77
Webpack Encore gave Symfony first-class asset integration for Webpack.
8-
Symfony Reprise gives you the same integration for `Vite`_ and `Rsbuild`_.
8+
Symfony Reprise brings the same to `Vite`_ and `Rsbuild`_.
99

1010
Vite and Rsbuild already handle **Sass/Less/PostCSS**, **TypeScript**,
1111
**JSX/Vue/Svelte**, **code splitting**, **content hashing**, **source maps**,
1212
**minification** and **HMR** on their own, so Symfony Reprise does not
13-
reimplement any of that. It only covers the Symfony-side integration that
14-
bundlers do not provide out of the box:
15-
16-
- Multiple entries
17-
- ``entrypoints.json`` generation (build and dev-server modes)
18-
- ``manifest.json`` generation
19-
- Asset versioning wired into the manifest
20-
- CDN support (absolute ``publicPath``) *(planned)*
21-
- Dev server and HMR integration
22-
- Subresource Integrity (SRI) hashes *(planned)*
23-
- Shared runtime chunk across entries *(planned)*
24-
- Symfony UX / Stimulus controllers (``controllers.json`` and local
25-
``assets/controllers/``)
13+
reimplement any of that. It covers only the Symfony-side glue the bundlers
14+
leave out:
15+
16+
- **Multiple entries**: build several independent entry points from one
17+
config
18+
- ``entrypoints.json``: generated in both build and dev-server modes
19+
- ``manifest.json``: maps each logical filename to its hashed URL
20+
- **Asset versioning**: content-hash cache busting, wired into the manifest
21+
- **Dev server and HMR**: points Twig at the running Vite/Rsbuild server
22+
- **Symfony UX / Stimulus**: registers ``controllers.json`` and local
23+
controllers, eager or lazy
24+
- **CDN support**: absolute ``publicPath`` *(planned)*
25+
- **Subresource Integrity**: SRI hashes in ``entrypoints.json`` *(planned)*
26+
- **Shared runtime chunk**: one runtime shared across entries *(planned)*
27+
28+
It generates the Encore-compatible ``entrypoints.json`` and ``manifest.json``
29+
that WebpackEncoreBundle's Twig helpers (``encore_entry_script_tags()``,
30+
``encore_entry_link_tags()``) read, wires up the native dev server, and turns
31+
your Stimulus controllers into a running application.
2632

2733
Installation
2834
------------

doc/symfony-reprise.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)