heptacom/composer-node-bridge

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:composer-plugin

1.0.2 2024-11-06 20:39 UTC

This package is auto-updated.

Last update: 2024-11-06 20:40:28 UTC


README

Have you ever wanted to use node in your PHP project, but had no guarantee, it available in the $PATH of your environment? This composer plugin aims to solve that.

  1. Install the plugin as a normal composer dependency in your project.
  2. Allow the plugin to execute code in your project.
  3. You will now have vendor/bin/node and vendor/bin/npm.

Installation

composer require heptacom/composer-node-bridge

How Does It Work?

This plugin uses the Node Version Manager to install both Node and NPM into your vendor directory. It will not be added to your $PATH environment variable. NVM will not be available in your Shell. It only affects your PHP project.

The goal is to allow PHP code to rely on the availability of node without putting additional dependencies on your environment.

Limitations

Currently, only Node version 22 is supported.