Skip to content

Commit 74b3f75

Browse files
committed
tidy #8 [Docs] Enhance README(s) with logo and better text (Kocal)
This PR was merged into the main branch. Discussion ---------- [Docs] Enhance README(s) with logo and better text | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to open an issue if none exists, explain below instead --> | License | MIT <!-- Replace this notice with a description of your feature or bugfix. This helps reviewers and is a good starting point for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against the main branch. - Update or add documentation as required (we can help!). - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- df245f1 [Docs] Enhance README(s) with logo and better text
2 parents 1e1d7c8 + df245f1 commit 74b3f75

5 files changed

Lines changed: 122 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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
<p align="center">
10+
<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>
11+
<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>
12+
<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>
13+
<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>
14+
</p>
15+
16+
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.
17+
18+
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.
19+
20+
## Installation
21+
22+
```bash
23+
npm install @symfony/reprise --save-dev
24+
```
25+
26+
## Usage
27+
28+
Vite:
29+
30+
```js
31+
// vite.config.ts
32+
import { defineConfig } from 'vite';
33+
import Symfony from '@symfony/reprise/vite';
34+
35+
export default defineConfig({
36+
plugins: [Symfony({/* options */})],
37+
});
38+
```
39+
40+
Rsbuild:
41+
42+
```js
43+
// rsbuild.config.ts
44+
import { defineConfig } from '@rsbuild/core';
45+
import Symfony from '@symfony/reprise/rsbuild';
46+
47+
export default defineConfig({
48+
plugins: [Symfony({/* options */})],
49+
});
50+
```
51+
52+
See the [full documentation](https://github.com/symfony/reprise/blob/main/doc/index.rst) for entrypoints, manifest, dev server and Stimulus setup.
53+
54+
## License
55+
56+
[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)