Get support for cebe/composer-bower

If you're new to LTH, please see our FAQ for more information on what it is we do.

Support Options

Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:

View Open Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check out the page and see if there are any options to sponsor this project or it's developers directly.

cebe/composer-bower

composer-bower

Proof of concept for a repository to install bower packages using composer.

DEPRECATED: This project will not be continued, there is a much better solution.
Use the composer asset plugin instead.

The idea

Create a composer repository like packagist which provides package information of bower packages in composer format.

This repository will be filled with information from the bower registry.

What has to be done for this to work is, to write a script that converts bower.json syntax and semantics into a composer.json equivalent so that composer can read it and install the package accordingly. The package that is avilable via bower does not have to be adjusted for this.

The same thing can be implemented for other package managers like npm as well.

Using the repository in you application

Warning: This is an experiment! Current code is not fully working and URLs will change. Do not use it yet, this is just to describe how it will work when finally implemented.

Add the repository to your composer.json:

"repositories": [
        {
            "type": "composer",
            "url": "http://stuff.cebe.cc/composer-bower"
        }
]

The ugly URL will later be replaced with a hostname like for example bower.packagist.org.

You can then require:

"require": {
    "bower/angular": "*",
    "bower/jquery": "1.9.*",
    "bower/bootstrap": "~3.2.0",
    ...
},

Usage for the conversion script

./cli convert > packages.json

or

./cli convert --verbose > packages.json

Note: bower has about 15000 packages registered. This command will make 15000 * (1 + v) request against github. (v = number of versions of a package). So it currently has a limit param on the versions and packages to fetch.

Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2