netgusto / distribution-bundle
Symfony2 项目分发助手Bundle
v1.0.0
2014-06-06 15:19 UTC
Requires
- php: >=5.3.3
- symfony/framework-bundle: ~2.4
This package is not auto-updated.
Last update: 2024-09-24 01:28:07 UTC
README
转发资产包到web目录
在 app/config.yaml 中
netgusto_distribution: assets_forwarding: dest_dir: ~ packages: - some/package - some/otherpackage
在 composer.json 中
{
'...',
"scripts": {
"post-install-cmd": [
'...',
"Netgusto\\DistributionBundle\\Composer\\ScriptHandler::forwardAssetsToWebDir"
],
"post-update-cmd": [
'...',
"Netgusto\\DistributionBundle\\Composer\\ScriptHandler::forwardAssetsToWebDir"
]
},
'...',
}
在 app/AppKernel.php 中
$bundles = array( // ... new Netgusto\DistributionBundle\NetgustoDistributionBundle(), // ... );
在执行 composer install 和每次执行 composer update 时,包将被转发到 web/vendor。