mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 15:46:37 +03:00
65 lines
3.2 KiB
JSON
65 lines
3.2 KiB
JSON
{
|
|
"locks": {
|
|
"api-platform/admin-pack": {
|
|
"version": "1.0",
|
|
"recipe": {
|
|
"repo": "1.0",
|
|
"branch": "master",
|
|
"version": "1.0",
|
|
"ref": "703c6453b039330753a7ae6cebd0af8ab1d770d8"
|
|
}
|
|
}
|
|
},
|
|
"manifests": {
|
|
"api-platform/admin-pack": {
|
|
"repository": "github.com/symfony/recipes",
|
|
"package": "api-platform/admin-pack",
|
|
"version": "1.0",
|
|
"manifest": {
|
|
"copy-from-recipe": {
|
|
"assets/": "assets/",
|
|
"config/": "%CONFIG_DIR%/",
|
|
"templates/": "templates/"
|
|
},
|
|
"aliases": [
|
|
"api-admin",
|
|
"api-platform-admin",
|
|
"react-admin"
|
|
],
|
|
"post-install-output": [
|
|
" * Your admin is almost ready:",
|
|
" 1. Install the JavaScript dependencies by running <comment>yarn add @api-platform/admin @babel/preset-react</comment>",
|
|
" 2. Edit <comment>webpack.config.js</comment> and <info>uncomment</info> the following lines:",
|
|
"",
|
|
" Encore",
|
|
" // ...",
|
|
" .enableReactPreset()",
|
|
" .addEntry('admin', './assets/js/admin.js')",
|
|
"",
|
|
" * Mark entities you want in the admin with the <comment>@ApiResource</comment> annotation, it appears in the admin!",
|
|
"",
|
|
" * Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>"
|
|
]
|
|
},
|
|
"files": {
|
|
"templates/admin.html.twig": {
|
|
"contents": "{% extends 'base.html.twig' %}\n\n{% block title %}API Platform Admin{% endblock %}\n\n{% block body %}<div id=\"api-platform-admin\"></div>{% endblock %}\n\n{% block javascripts %}\n <script type=\"text/plain\" id=\"api-entrypoint\">{{ path('api_entrypoint') }}</script>\n {{ encore_entry_script_tags('admin') }}\n{% endblock %}\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"config/routes/api_platform_admin.yaml": {
|
|
"contents": "admin:\n path: /admin\n controller: Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController\n defaults:\n template: admin.html.twig\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
},
|
|
"assets/js/admin.js": {
|
|
"contents": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HydraAdmin } from '@api-platform/admin';\n\nconst entrypoint = document.getElementById('api-entrypoint').innerText;\n\nReactDOM.render(<HydraAdmin entrypoint={entrypoint}/>, document.getElementById('api-platform-admin'));\n",
|
|
"executable": false,
|
|
"encoding": ""
|
|
}
|
|
},
|
|
"origin": "api-platform/admin-pack:1.0@github.com/symfony/recipes:master",
|
|
"is_contrib": false
|
|
}
|
|
}
|
|
} |