ChromaticHQ / calliope

An opinionated yet extensible toolset to handle common front-end tasks
3 stars 0 forks source link

GH-20 Ignore empty fonts and images task config #21

Closed agarzola closed 2 years ago

agarzola commented 2 years ago

Description

This PR ignores the downstream fonts and images config if they are empty objects.

Motivation / Context

The fonts and images tasks are the only pipeline tasks that we do not run by default. Since including an empty object for these two tasks makes the boilerplate calliope.config.js file easier to read, we need to make an exception in our logic so that if downstream configuration includes empty objects for either of these two tasks, they are ignored.

Closes GH-20.

Testing Instructions / How This Has Been Tested

I fixed the issue locally and tested it with a modified version of the chromatichq-eleventy repo that has the boilerplate config. See screenshots below.

Screenshots

The problem The fix
image image

Documentation

I added a comment above the logic in question explaining what it does.