Coder Social home page Coder Social logo

composer-plugin-monorepo-path's Introduction

monorepo-builder-path (composer plugin)

Composer plugin intended to use in conjunction with symplify/monorepo-builder.

When having a repository of kind:

monorepo_dir
 ` bundles
    ` subproject1
    ` subproject2
 ` projects
    ` example1

where example1 has dependencies to monorepo/subproject1 you may like to install vendors, while keeping only a single copy of your subproject1. Symlinks aka. Path-Repositories to the rescue!

This also allows you to use the dependency before even publishing it to an external, without manually adding the path-repository to your composer.json

Usage

composer global require meeva/composer-monorepo-builder-path-plugin

That's all. Nothing to configure. It detects your monorepo_dir by traversing up to your merged composer.json, and search all other composer.json in subdirectories (vendor excluded).

Now if you do composer require monorepo/subproject1 within the path monorepo_dir/projects/example1 it should use a path-symlink to install the dependency to monorepo_dir/projects/example1/vendor.

Deployment

Assuming you're gonna build a deploy version of your Project, this plugin is disabled if you're using --no-dev.

Also you can use the environment-variable COMPOSER_MONOREPO with one of these values:

  • force -> enable, even if --no-dev is present
  • skip -> disabled
  • anything else (default) -> enabled, unless --no-dev is present

Known Caveats

  • Performance is bad on Windows, but I'm sure you're used to it by now

composer-plugin-monorepo-path's People

Contributors

drainerlight avatar possi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.