File tree Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Welcome to your app's main JavaScript file!
3
+ *
4
+ * This file will be included onto the page via the importmap() Twig function,
5
+ * which should already be in your base.html.twig.
6
+ */
7
+ import './styles/app.css'
8
+
9
+ console . log ( 'This log comes from assets/app.js - welcome to AssetMapper! 🎉' )
Original file line number Diff line number Diff line change
1
+ body {
2
+ background-color : skyblue;
3
+ }
Original file line number Diff line number Diff line change
1
+ framework :
2
+ asset_mapper :
3
+ # The paths to make available to the asset mapper.
4
+ paths :
5
+ - assets/
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * Returns the import map for this application.
5
+ *
6
+ * - "path" is a path inside the asset mapper system. Use the
7
+ * "debug:asset-map" command to see the full list of paths.
8
+ *
9
+ * - "entrypoint" (JavaScript only) set to true for any module that will
10
+ * be used as an "entrypoint" (and passed to the importmap() Twig function).
11
+ *
12
+ * The "importmap:require" command can be used to add new entries to this file.
13
+ *
14
+ * This file has been auto-generated by the importmap commands.
15
+ */
16
+ return [
17
+ 'app ' => [
18
+ 'path ' => './assets/app.js ' ,
19
+ 'entrypoint ' => true ,
20
+ ],
21
+ ];
Original file line number Diff line number Diff line change
1
+ {
2
+ "copy-from-recipe" : {
3
+ "assets/" : " assets/" ,
4
+ "config/" : " %CONFIG_DIR%/" ,
5
+ "importmap.php" : " importmap.php"
6
+ },
7
+ "aliases" : [" asset-mapper" , " importmap" ],
8
+ "gitignore" : [
9
+ " /%PUBLIC_DIR%/assets/" ,
10
+ " /assets/vendor"
11
+ ],
12
+ "add-lines" : [
13
+ {
14
+ "file" : " templates/base.html.twig" ,
15
+ "content" : " {{ importmap('app') }}" ,
16
+ "position" : " after_target" ,
17
+ "target" : " {% block javascripts %}" ,
18
+ "warn_if_missing" : true
19
+ }
20
+ ],
21
+ "conflict" : {
22
+ "symfony/framework-bundle" : " <6.3" ,
23
+ "symfony/twig-bundle" : " <6.3" ,
24
+ "symfony/flex" : " <1.20.0 || >=2.0.0,<2.3.0"
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments