Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(REF) Switch to composer-compile-lib #18646

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

totten
Copy link
Member

@totten totten commented Sep 30, 2020

Overview

This is a revision of a change made in the same dev-cycle (#18465). It externalizes some code and makes it easier to use the same techniques in an extension.

Before

  • civicrm-core
    • Requires several libraries: scssphp, php-autoprefixer, and compile-plugin
    • Defines a compilation task Civi\Compile\Scss::build.
  • civicrm-core:ext/greenwich
    • Uses Civi\Compile\Scss::build

After

  • civicrm-core
    • Requires one library (composer-compile-lib) -- which in turn pulls in those others
  • civicrm-core:ext/greenwich
    • Uses the shared task CCL\Tasks::scss

Comments

There are a couple upshots of this change:

  1. Both core ext's and standalone ext's can use the same helper CCL\Tasks::scss
  2. CCL's SCSS helper is a little richer than core's, e.g.
    • The CSS output is written as two files, a larger *.css and a smaller *.min.css
    • Allows another option scss-import-prefixes, which makes it easier to stitch together files from diff places
  3. CCL has a few more helpers (which are described in its README).

See also: https://github.com/civicrm/composer-compile-lib

The overall effect of this change is to get access to a few more helpers.

Before: Load `composer-compile-plugin`, `scssphp`, and `php-autoprefxer` as
three distinct packages.

After: Load `composer-compile-lib`, which transitively requires all those others
*and* includes some helpers.

Sea also

* https://github.com/civicrm/composer-compile-plugin
* https://github.com/civicrm/composer-compile-lib
@civibot
Copy link

civibot bot commented Sep 30, 2020

(Standard links)

@civibot civibot bot added the master label Sep 30, 2020
@seamuslee001 seamuslee001 merged commit 89b4fe4 into civicrm:master Oct 1, 2020
@totten totten deleted the master-complib branch October 1, 2020 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants