ogrosko / typo3-composer-maintenance
此包已废弃,不再维护。未建议替代包。
为 typo3 启用/禁用维护模式的 Composer 预/后脚本
0.0.7
2016-12-08 14:47 UTC
This package is not auto-updated.
Last update: 2024-02-08 07:37:55 UTC
README
当您使用 Typo3 with composer 模式(我相信不仅限于 Typo3),这些脚本会在您运行 composer update
时自动将您的网站设置为维护模式。typo3-composer-maintenance 是 composer 预更新/后更新部分的简单脚本集合。
使用 Composer 安装
$ composer require ogrosko/typo3-composer-maintenance
使用方法
在您的 composer.json
文件的 scripts
部分添加以下配置
"scripts": { "pre-update-cmd": [ "@enableMaintenance" ], "post-update-cmd": [ "@disableMaintenance" ], "enableMaintenance": "OGrosko\\Composer\\Typo3ComposerMaintenance::maintenance_enable", "disableMaintenance": "OGrosko\\Composer\\Typo3ComposerMaintenance::maintenance_disable" },
配置
在 extra
部分也有额外的配置可用
template-path
- 使用您自定义的维护模板路径exclude-ips
- 从维护模式中排除您的 IP
"extra": { "ogrosko-composer-typo3composermaintenance": { "template-path": "tpl/", "exclude-ips": [ "127.0.0.1", "192.168.1.1" ] } }