Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Inviqa techPortal:
Manage Project Dependencies with Bower and Composer
Jan 30, 2014 @ 18:20:40

On the Inviqa techPortal there's a new tutorial showing you how to manage your dependencies with the help of both Composer and Bower (a Javascript package manager).

As developers, most of us rely on third-party libraries as part of our web applications. PHP developers manage their dependencies with Composer, but how can you manage your client-side dependencies? Most projects start with one core JavaScript library (e.g. jQuery) and one or two plugins, but over time the application grows, and the list of JavaScript libraries grows as well. In this situation, Bower can help you, and in this article you will see how to integrate it into your own project.

You'll need Node installed to use Bower, but the installation process is simple - just one call to load it via npm. They help you get the configuration set up and how to specify its dependencies. Anyone familiar with how Composer works should feel right at home using a similar JSON structure. With that in place, you can move on to the next step, integrating it with Composer. In the Composer configuration, there's a setting for "scripts" that can be run before the install command is executed and some after the install is complete. This is where they call "bower install" to have it install the needed Javascript-based dependencies.

tagged: project dependencies bower composer integrate introduction

Link: http://techportal.inviqa.com/2014/01/29/manage-project-dependencies-with-bower-and-composer/


Trending Topics: