neronmoon / scriptsdev
Composer 的 Scripts-dev 行为
v0.1.9
2020-12-16 08:02 UTC
Requires
- composer-plugin-api: ^1.0 || ^2.0
Requires (Dev)
- composer/composer: ~1.0@dev || ~2.0@dev
This package is auto-updated.
Last update: 2024-09-16 15:46:35 UTC
README
就像 require-dev,但用于脚本
安装
只需运行 composer require neronmoon/scriptsdev --dev
使用方法
安装后,你可以在你的 composer.json
中添加额外的.scripts-dev 指令
... "extra": { "scripts-dev": { "post-install-cmd": [ "npm install --dev" ], "post-update-cmd": "php ./someCoolCommand.php", "test": "phpunit" }, } ...
过时用法
... "scripts-dev": { "post-install-cmd": [ "npm install --dev" ], "post-update-cmd": "php ./someCoolCommand.php" } ...
已知问题
- 使用此插件会在验证过程中产生轻微的警告。
composer validate
命令会显示类似以下的内容。
./composer.json is valid, but with a few warnings
See https://getcomposer.org.cn/doc/04-schema.md for details on the schema
Description for non-existent script "test" found in "scripts-descriptions"