Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
Component Installer allows installation of Components (third-party JavaScript and CSS packages) through Composer. This module facilitates its use for Drupal.
Dependencies
Usage
- Add the Components you want to your module's composer.json file:
{ "require": { "components/underscore": "*", "components/normalize.css": "*" } }
- Make your module depend on component_installer in your .info file:
dependencies[] = component_installer
- Use Composer Manager to help build and install the Composer dependencies.
- The Component's JavaScript is now available for use through require.js:
require(['underscore'], function (_) { // Underscore is now available. _.each([1, 2, 3], alert); });
- Any CSS that the Component provides is automatically loaded.
Available Components
See Packagist search for "component" for a list of available Components.
Project information
- Module categories: Developer Tools, Integrations
- Created by RobLoach on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.