php-forge/foxy
Composer 安装命令:
composer require php-forge/foxy
包简介
Fast, reliable, and secure Bun/NPM/Yarn/pnpm bridge for Composer
README 文档
README
Foxy
Foxy is a Composer plugin that aggregates asset dependencies from Composer packages into a single package.json and runs Bun, npm, Yarn, or pnpm while preserving the Composer state on failures.
Features
Installation
composer require php-forge/foxy:^0.1
Manager can be bun, npm, yarn or pnpm. For default, npm is used.
{
"require": {
"php-forge/foxy": "^0.1"
},
"config": {
"foxy": {
"manager": "bun"
}
}
}
Quick start
Standard PHP project (Yii2)
In a standard PHP application, keep a package.json file at the project root. Foxy will merge asset dependencies from
installed Composer packages and run the configured manager during Composer install and update.
Example (Yii2 app template):
{
"require": {
"php-forge/foxy": "^0.1"
},
"config": {
"foxy": {
"manager": "npm"
}
}
}
Drupal layout (package.json under web/)
In a typical Drupal proof-of-concept workflow, Composer stays at the repository root while frontend tooling and builds
live under web/.
Foxy lets you keep that layout while still aggregating asset dependencies and running npm in the correct directory, with Composer state preserved if the install fails.
- Aggregates asset dependencies declared by Composer packages into a single npm install.
- Keeps asset tooling configuration consistent across local and CI environments.
- Restores Composer lock and PHP dependencies if npm exits with an error.
- Runs npm against the
web/package.json without moving Composer files.
{
"config": {
"foxy": {
"manager": "npm",
"root-package-json-dir": "web"
}
}
}
Documentation
- 📚 Guide
- 💡 Usage
- ⚙️ Configuration
- 📅 Events
- ❓ FAQs
- 🧪 Testing Guide
- 🛠️ Development Guide
Package information
Quality code
Our social networks
License
统计信息
- 总下载量: 132.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 45
- 点击次数: 15
- 依赖项目数: 13
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-01-19