mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 23:26:27 +03:00
Create Flex endpoint
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"aliases": {
|
||||
"asset-mapper": "symfony/asset-mapper",
|
||||
"assetmapper": "symfony/asset-mapper",
|
||||
"importmap": "symfony/asset-mapper"
|
||||
},
|
||||
"recipes": {
|
||||
"symfony/asset-mapper": [
|
||||
"6.3",
|
||||
"6.4",
|
||||
"8.2"
|
||||
]
|
||||
},
|
||||
"recipe-conflicts": {
|
||||
"symfony/asset-mapper": {
|
||||
"6.3": {
|
||||
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0",
|
||||
"symfony/framework-bundle": "<6.3",
|
||||
"symfony/twig-bundle": "<6.3"
|
||||
},
|
||||
"6.4": {
|
||||
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0",
|
||||
"symfony/framework-bundle": "<6.3",
|
||||
"symfony/twig-bundle": "<6.3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"versions": [],
|
||||
"branch": "main",
|
||||
"is_contrib": false,
|
||||
"_links": {
|
||||
"repository": "github.com/symfony/recipes",
|
||||
"origin_template": "{package}:{version}@github.com/symfony/recipes:main",
|
||||
"recipe_template": "https://raw.githubusercontent.com/symfony/recipes/flex/pull-1567/{package_dotted}.{version}.json",
|
||||
"recipe_template_relative": "{package_dotted}.{version}.json",
|
||||
"archived_recipes_template": "https://raw.githubusercontent.com/symfony/recipes/flex/pull-1567/archived/{package_dotted}/{ref}.json",
|
||||
"archived_recipes_template_relative": "archived/{package_dotted}/{ref}.json"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"manifests": {
|
||||
"symfony/asset-mapper": {
|
||||
"manifest": {
|
||||
"copy-from-recipe": {
|
||||
"assets/": "assets/",
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"importmap.php": "importmap.php"
|
||||
},
|
||||
"gitignore": [
|
||||
"/%PUBLIC_DIR%/assets/"
|
||||
],
|
||||
"add-lines": [
|
||||
{
|
||||
"file": "templates/base.html.twig",
|
||||
"content": " {{ importmap() }}",
|
||||
"position": "after_target",
|
||||
"target": "{% block javascripts %}",
|
||||
"warn_if_missing": true
|
||||
},
|
||||
{
|
||||
"file": "templates/base.html.twig",
|
||||
"content": " <link rel=\"stylesheet\" href=\"{{ asset('styles/app.css') }}\">",
|
||||
"position": "after_target",
|
||||
"target": "{% block stylesheets %}",
|
||||
"warn_if_missing": true
|
||||
}
|
||||
],
|
||||
"conflict": {
|
||||
"symfony/framework-bundle": "<6.3",
|
||||
"symfony/twig-bundle": "<6.3",
|
||||
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"assets/app.js": {
|
||||
"contents": [
|
||||
"/*",
|
||||
" * Welcome to your app's main JavaScript file!",
|
||||
" *",
|
||||
" * This file will be included onto the page via the importmap() Twig function,",
|
||||
" * which should already be in your base.html.twig.",
|
||||
" */",
|
||||
"console.log('This log comes from assets/app.js - welcome to AssetMapper! \ud83c\udf89')",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"assets/styles/app.css": {
|
||||
"contents": [
|
||||
"body {",
|
||||
" background-color: skyblue;",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"config/packages/asset_mapper.yaml": {
|
||||
"contents": [
|
||||
"framework:",
|
||||
" asset_mapper:",
|
||||
" # The paths to make available to the asset mapper.",
|
||||
" paths:",
|
||||
" - assets/",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"importmap.php": {
|
||||
"contents": [
|
||||
"<?php",
|
||||
"",
|
||||
"/**",
|
||||
" * Returns the import map for this application.",
|
||||
" *",
|
||||
" * - \"path\" is a path inside the asset mapper system. Use the",
|
||||
" * \"debug:asset-map\" command to see the full list of paths.",
|
||||
" *",
|
||||
" * - \"preload\" set to true for any modules that are loaded on the initial",
|
||||
" * page load to help the browser download them earlier.",
|
||||
" *",
|
||||
" * The \"importmap:require\" command can be used to add new entries to this file.",
|
||||
" *",
|
||||
" * This file has been auto-generated by the importmap commands.",
|
||||
" */",
|
||||
"return [",
|
||||
" 'app' => [",
|
||||
" 'path' => 'app.js',",
|
||||
" 'preload' => true,",
|
||||
" ],",
|
||||
"];",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
}
|
||||
},
|
||||
"ref": "797942563df383cfcce006db70c37e8449b9ffc6"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"manifests": {
|
||||
"symfony/asset-mapper": {
|
||||
"manifest": {
|
||||
"copy-from-recipe": {
|
||||
"assets/": "assets/",
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"importmap.php": "importmap.php"
|
||||
},
|
||||
"gitignore": [
|
||||
"/%PUBLIC_DIR%/assets/",
|
||||
"/assets/vendor/"
|
||||
],
|
||||
"composer-scripts": {
|
||||
"importmap:install": "symfony-cmd"
|
||||
},
|
||||
"add-lines": [
|
||||
{
|
||||
"file": "templates/base.html.twig",
|
||||
"content": " {% block importmap %}{{ importmap('app') }}{% endblock %}",
|
||||
"position": "after_target",
|
||||
"target": "{% block javascripts %}",
|
||||
"warn_if_missing": true
|
||||
}
|
||||
],
|
||||
"conflict": {
|
||||
"symfony/framework-bundle": "<6.3",
|
||||
"symfony/twig-bundle": "<6.3",
|
||||
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"assets/app.js": {
|
||||
"contents": [
|
||||
"/*",
|
||||
" * Welcome to your app's main JavaScript file!",
|
||||
" *",
|
||||
" * This file will be included onto the page via the importmap() Twig function,",
|
||||
" * which should already be in your base.html.twig.",
|
||||
" */",
|
||||
"import './styles/app.css';",
|
||||
"",
|
||||
"console.log('This log comes from assets/app.js - welcome to AssetMapper! \ud83c\udf89');",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"assets/styles/app.css": {
|
||||
"contents": [
|
||||
"body {",
|
||||
" background-color: skyblue;",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"config/packages/asset_mapper.yaml": {
|
||||
"contents": [
|
||||
"framework:",
|
||||
" asset_mapper:",
|
||||
" # The paths to make available to the asset mapper.",
|
||||
" paths:",
|
||||
" - assets/",
|
||||
" missing_import_mode: strict",
|
||||
"",
|
||||
"when@prod:",
|
||||
" framework:",
|
||||
" asset_mapper:",
|
||||
" missing_import_mode: warn",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"importmap.php": {
|
||||
"contents": [
|
||||
"<?php",
|
||||
"",
|
||||
"/**",
|
||||
" * Returns the importmap for this application.",
|
||||
" *",
|
||||
" * - \"path\" is a path inside the asset mapper system. Use the",
|
||||
" * \"debug:asset-map\" command to see the full list of paths.",
|
||||
" *",
|
||||
" * - \"entrypoint\" (JavaScript only) set to true for any module that will",
|
||||
" * be used as an \"entrypoint\" (and passed to the importmap() Twig function).",
|
||||
" *",
|
||||
" * The \"importmap:require\" command can be used to add new entries to this file.",
|
||||
" */",
|
||||
"return [",
|
||||
" 'app' => [",
|
||||
" 'path' => './assets/app.js',",
|
||||
" 'entrypoint' => true,",
|
||||
" ],",
|
||||
"];",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
}
|
||||
},
|
||||
"ref": "c01c47af2ec66a74ec046eccb919cfe27d3464ec"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"manifests": {
|
||||
"symfony/asset-mapper": {
|
||||
"manifest": {
|
||||
"copy-from-recipe": {
|
||||
"assets/": "assets/",
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"importmap.php": "importmap.php"
|
||||
},
|
||||
"gitignore": [
|
||||
"/%PUBLIC_DIR%/assets/",
|
||||
"/assets/vendor/"
|
||||
],
|
||||
"composer-scripts": {
|
||||
"importmap:install": "symfony-cmd"
|
||||
},
|
||||
"add-lines": [
|
||||
{
|
||||
"file": "templates/base.html.twig",
|
||||
"content": " {% block importmap %}{{ importmap('app') }}{% endblock %}",
|
||||
"position": "after_target",
|
||||
"target": "{% block javascripts %}",
|
||||
"warn_if_missing": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"files": {
|
||||
"assets/app.js": {
|
||||
"contents": [
|
||||
"/*",
|
||||
" * Welcome to your app's main JavaScript file!",
|
||||
" *",
|
||||
" * This file will be included onto the page via the importmap() Twig function,",
|
||||
" * which should already be in your base.html.twig.",
|
||||
" */",
|
||||
"import './styles/app.css';",
|
||||
"",
|
||||
"console.log('This log comes from assets/app.js - welcome to AssetMapper! \ud83c\udf89');",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"assets/styles/app.css": {
|
||||
"contents": [
|
||||
"body {",
|
||||
" background-color: skyblue;",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"config/packages/asset_mapper.yaml": {
|
||||
"contents": [
|
||||
"framework:",
|
||||
" asset_mapper:",
|
||||
" # The paths to make available to the asset mapper.",
|
||||
" paths:",
|
||||
" - assets/",
|
||||
" missing_import_mode: strict",
|
||||
" minimum_release_age: 604800",
|
||||
"",
|
||||
"when@prod:",
|
||||
" framework:",
|
||||
" asset_mapper:",
|
||||
" missing_import_mode: warn",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"importmap.php": {
|
||||
"contents": [
|
||||
"<?php",
|
||||
"",
|
||||
"/**",
|
||||
" * Returns the importmap for this application.",
|
||||
" *",
|
||||
" * - \"path\" is a path inside the asset mapper system. Use the",
|
||||
" * \"debug:asset-map\" command to see the full list of paths.",
|
||||
" *",
|
||||
" * - \"entrypoint\" (JavaScript only) set to true for any module that will",
|
||||
" * be used as an \"entrypoint\" (and passed to the importmap() Twig function).",
|
||||
" *",
|
||||
" * The \"importmap:require\" command can be used to add new entries to this file.",
|
||||
" */",
|
||||
"return [",
|
||||
" 'app' => [",
|
||||
" 'path' => './assets/app.js',",
|
||||
" 'entrypoint' => true,",
|
||||
" ],",
|
||||
"];",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
}
|
||||
},
|
||||
"ref": "f83ba144561be516af7124eee362e3ef0f57cd18"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user