Coder Social home page Coder Social logo

localpackages's Introduction

LocalPackages

Automatically symlink composer packages post-install/update for easier local development

Installation

LocalPackages can be installed globally or per project, with Composer:

Globally (recommended): composer global require luminsports/localpackages Per project: composer require --dev luminsports/localpackages

Usage

  1. Create a composer.localpackages.json file in your project root directory. This file will contain your mapping of paths to locally developed packages
  2. Populate it with paths, in the following JSON format:
{
    "paths": [
        "~/path/to/your/package",
        "~/path/to/your/other-package",
    ]
}
  1. Since the configuration you will provide is unique to your environment, it would be best practice to add composer.localpackages.json to your .gitignore file.
  2. composer install or composer update. LocalPackages will scan the directories specified in your composer.localpackages.json file for packages. If, for example, you used the configuration above and ~/path/to/your/package contains a composer.json file for your/package, your project will symlink any your/package dependency to ~/path/to/your/package automatically.

Known Issues

If anything weird happens and you get stuck, try rm -r vendor/ composer.lock && composer install. If that doesn't work, blame me.

  • I don't believe this works when using composer require your/package. Just run composer update your/package afterwards, and everything should symlink

License

This code is published under the MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.

Thanks

This package is a super-simplified version of franzl/studio.

localpackages's People

Contributors

ryzr avatar

Stargazers

Lucas Martin avatar

Watchers

Lucas Martin avatar

Forkers

topredmedia

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.