question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Frontend gulp tasks are complicated and doing too many things

See original GitHub issue

Cause

  • There are loads of sequences that build on top of each other.
  • There are tasks called both copy:assets and copy-assets.
  • Tasks are sometimes in files with different names
  • The scss:compile task is responsible for creating both the app CSS and the dist CSS, depending on a flag. The pipelines for these files are similar, but not identical, but completely different files are built depending on the flag.
  • The js:compile task is responsible for creating both the app JS and the dist JS, depending on a flag. The pipelines for these files are similar, but not identical, but completely different files are built depending on the flag.

Consequences

  • It’s hard to make changes to our build pipeline
  • It’s hard for contributors to understand how our build pipeline works
  • It’s easy to run the wrong task because there are many similarly named tasks or ways of running things (e.g. gulp directly vs npm scripts)
  • We have a lot of dependencies, which means a greater attack surface, and more maintenance effort is required

Impact of debt

Medium, it works most of the time, but there is a high risk of breaking things when changes are needed.

Effort to pay down

High, we don’t know enough about Gulp on the team, and we would want to be sure that any changes made don’t break the build or lose functionality we need

Overall rating:

Medium

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
domoscargincommented, Jun 30, 2022

Posting here to say that a lot of the dependency problems stem from our use of oldie for IE8 styles compilation, which clashes with bumping most other css-related dependencies (the package itself is a bit of an oldie - latest release 7 years ago!). We might want to consider removing IE8 support in our browser support breaking release before working on this, since we could make these changes without a breaking release.

edit: Aha, just found #2469

0reactions
lfdebruxcommented, Nov 23, 2022

@colinrotherham I wasn’t involved in writing the ticket (just copied it from an old Trello board https://github.com/alphagov/govuk-frontend/issues/2243#issuecomment-854727436), so possibly not the best person to ask, sorry!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spike into alternatives for Gulp #2558 - GitHub
We know there are issues with our current use of Gulp: they are complicated and doing too many things; some of our Gulp...
Read more >
Managing complex tasks with gulp v4
Too many npm scripts. Scripts start becoming hard to follow, and it's often unclear which scripts are meant to be run by people,...
Read more >
Super simple Gulp tutorial for beginners - freeCodeCamp
Gulp can do a lot more complex tasks than the ones I've mentioned above. However, this tutorial will be focused on just the...
Read more >
Automate your front-end development with Gulp - Skcript
Gulp is a task runner - meaning that you can use it to find common tasks which you can later develop magically so...
Read more >
A Gulp Workflow for Frontend Development Automation
gulp is a toolkit for automating painful or time-consuming tasks in your development workflow, so you can stop messing around and build ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found