Skip to content

Commit 1af997d

Browse files
authored
[StimulusBundle] Removing ux_controller_link_tags() (#1262)
1 parent 7d2f5aa commit 1af997d

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// register any custom, 3rd party controllers here
2+
// app.register('some_controller_name', SomeImportedController);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"controllers": [],
3+
"entrypoints": []
4+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Controller } from '@hotwired/stimulus';
2+
3+
/*
4+
* This is an example Stimulus controller!
5+
*
6+
* Any element with a data-controller="hello" attribute will cause
7+
* this controller to be executed. The name "hello" comes from the filename:
8+
* hello_controller.js -> "hello"
9+
*
10+
* Delete this file or adapt it for your use!
11+
*/
12+
export default class extends Controller {
13+
connect() {
14+
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
15+
}
16+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"bundles": {
3+
"Symfony\\UX\\StimulusBundle\\StimulusBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"assets/": "assets/"
7+
},
8+
"aliases": ["stimulus", "stimulus-bundle"],
9+
"conflict": {
10+
"symfony/webpack-encore-bundle": "<2.0",
11+
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
12+
},
13+
"add-lines": [
14+
{
15+
"file": "webpack.config.js",
16+
"content": "\n // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)\n .enableStimulusBridge('./assets/controllers.json')",
17+
"position": "after_target",
18+
"target": ".splitEntryChunks()"
19+
},
20+
{
21+
"file": "assets/app.js",
22+
"content": "import './bootstrap.js';",
23+
"position": "top",
24+
"warn_if_missing": true
25+
},
26+
{
27+
"file": "assets/bootstrap.js",
28+
"content": "import { startStimulusApp } from '@symfony/stimulus-bridge';\n\n// Registers Stimulus controllers from controllers.json and in the controllers/ directory\nexport const app = startStimulusApp(require.context(\n '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',\n true,\n /\\.[jt]sx?$/\n));",
29+
"position": "top",
30+
"requires": "symfony/webpack-encore-bundle"
31+
},
32+
{
33+
"file": "assets/bootstrap.js",
34+
"content": "import { startStimulusApp } from '@symfony/stimulus-bundle';\n\nconst app = startStimulusApp();",
35+
"position": "top",
36+
"requires": "symfony/asset-mapper"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)