Skip to content

Commit 866208a

Browse files
committed
Merge branch 'stimulus-recipe'
2 parents 261d493 + 8728ab5 commit 866208a

4 files changed

Lines changed: 17 additions & 16 deletions

File tree

.editorconfig

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,23 @@ trim_trailing_whitespace = true
1313
[*.css]
1414
indent_size = 2
1515

16-
[*.js]
16+
[*.{js,ts}]
1717
indent_size = 2
1818

1919
[*.md]
2020
trim_trailing_whitespace = false
2121

22-
[*.ts]
23-
indent_size = 2
24-
2522
[*.twig]
2623
indent_size = 2
2724

2825
[*.yaml]
2926
indent_size = 2
3027

31-
# Override indent size for YAML files that are managed with Symfony Flex recipes
28+
# Symfony Flex
29+
# Use custom indent for files managed by Symfony Flex recipes
30+
31+
[{assets/stimulus_bootstrap.js,assets/controllers/csrf_protection_controller.js}]
32+
indent_size = 4
33+
3234
[config/**.yaml]
3335
indent_size = 4

assets/bootstrap.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

assets/dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
* (and its CSS file) in your base layout (base.html.twig).
66
*/
77

8-
import './bootstrap';
8+
import './stimulus_bootstrap.js';
99

1010
import './stylesheets/dashboard-theme.css';

assets/stimulus_bootstrap.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
import { startStimulusApp } from '@symfony/stimulus-bridge';
2+
3+
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
4+
export const app = startStimulusApp(require.context(
5+
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
6+
true,
7+
/\.[jt]sx?$/
8+
));
9+
110
// register any custom, 3rd party controllers here
211
// app.register('some_controller_name', SomeImportedController);

0 commit comments

Comments
 (0)