Skip to content
4.x
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

This respository contains Drupal modules that provide a framework for back-end and front-end development which includes many PHP, JavaScript, and Sass utilities, UX improvements and widgets, base styles, and libraries; for more information, see the component system explainer. These are used across multiple sites, including ambientimpact.com.

While not required for these modules to operate, the ambientimpact_base theme integrates heavily with these modules.

Warning: while these are generally production-ready, they're not guaranteed to maintain a stable API and may occasionally contain bugs, being a work-in-progress. Stable releases may be provided at a later date.


Using Composer

If you're using Composer to manage your root project (which you really should), assuming your project is using drupal-composer/drupal-project and has installed both wikimedia/composer-merge-plugin and cweagans/composer-patches, you must add the following to your root composer.json:

"extra": {
  "merge-plugin": {
    "include": [
      "drupal/modules/ambientimpact/*/composer.json",
      "drupal/modules/ambientimpact/*/*/composer.json"
    ],
    "merge-extra": true,
    "merge-extra-deep": true
  }
}

Once everything is configured, running composer install in your project root is all you have to do.

Notes

  • The merge-plugin item should already exist by default in your root composer.json, so you'll have to merge it in manually.
  • If you install this to a different location, update the path accordingly.
  • You must define patches in your root composer.json and not in an external file via the patches-file setting for wikimedia/composer-merge-plugin to be able to merge in patches from dependencies.
  • If your Drupal project was already installed manually or via Drush, you can use grasmash/composerize-drupal to convert it to Composer.

Third-party front-end libraries

These are managed via Composer like back-end dependencies. See third-party_libraries.md for more information.

Building

Installation

To build the CSS, and icon bundles for this project, you'll need to have Node.js installed. Once you've installed it, you'll have to install the Grunt CLI globally from the commandline:

npm install -g grunt-cli

Once that's installed, you can then install all the required Node modules by running npm install in the project root.

Building

To build everything, you can run grunt all in the commandline in the project root.

To build specific things:

  • grunt css - builds all CSS files and their associated map files.
  • grunt icons - builds all icon bundles by merging the individual icon SVG files.

Major breaking changes

The following major version bumps indicate breaking changes:

  • 3.x - Some modules now require Drupal 9 and all development is now against that major version of Drupal.

  • 4.x - Refactored to use Sass modules; all development is now against this and will no longer compile using the old @import directive.

About

Drupal modules that provide a framework for back-end and front-end development.

Topics

Resources

License

Releases

No releases published

Packages

No packages published