Skip to content
/ foxy Public
generated from yii-tools/template

A fast, reliable, and secure BUN/NPM/Yarn/PNpM bridge for Composer.

License

Notifications You must be signed in to change notification settings

php-forge/foxy

Repository files navigation

PHP Forge

Foxy


PHPUnit Easy Coding Standard Dependency Check

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

Feature Overview

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):

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

Package information

PHP Latest Stable Version Total Downloads

Quality code

Codecov Easy Coding Standard Dependency Check

Our social networks

Follow on X

License

Foxy is released under the MIT license. See the complete license in:

LICENSE

About

A fast, reliable, and secure BUN/NPM/Yarn/PNpM bridge for Composer.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages