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

Log sass compile errors #1069

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Log sass compile errors #1069

merged 2 commits into from
Nov 29, 2024

Conversation

frankieroberto
Copy link
Contributor

This makes it easier to debug sass compile errors, by logging those errors to the terminal.

See gulp-sass documentation.

Before

[19:11:41] Using gulpfile ~/Sites/nhsuk-frontend/gulpfile.js
[19:11:41] Starting 'bundle'...
[19:11:41] Starting 'cleanDist'...
[19:11:41] Finished 'cleanDist' after 6.77 ms
[19:11:41] Starting 'build'...
[19:11:41] Starting 'compileCSS'...
[19:11:42] The following tasks did not complete: bundle, build, compileCSS
Did you forget to signal async completion?
npm error code 1
npm error path /Users/frankieroberto/Sites/nhsuk-frontend
npm error command failed
npm error command sh -c gulp bundle
npm error A complete log of this run can be found in: /Users/frankieroberto/.npm/_logs/2024-11-07T19_11_40_228Z-debug-0.log

After

[19:15:54] Using gulpfile ~/Sites/nhsuk-frontend/gulpfile.js
[19:15:54] Starting 'build'...
[19:15:54] Starting 'compileCSS'...
Error in plugin "sass"
Message:
    packages/components/action-link/_action-link.scss
Error: expected "{".
   ╷
16 │ FIXME }}}}
   │       ^
   ╵
  packages/components/action-link/_action-link.scss 16:7  @import
  packages/nhsuk.scss 5:9                                 root stylesheet
[19:15:54] Finished 'compileCSS' after 246 ms

This makes it easier to debug sass compile errors, by logging those errors to the terminal.
Copy link
Contributor

@edwardhorsford edwardhorsford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working locally.

It's a pity that the message get's nearly obscured by later messages - I wonder if we could improve that at all?

@frankieroberto
Copy link
Contributor Author

@anandamaryon1 ok to merge this?

@frankieroberto frankieroberto merged commit af15409 into main Nov 29, 2024
5 checks passed
@frankieroberto frankieroberto deleted the log-sass-compile-errors branch November 29, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants