Frontend gulp tasks are complicated and doing too many things
See original GitHub issueCause
- There are loads of sequences that build on top of each other.
- There are tasks called both
copy:assets
andcopy-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:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
@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!