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

Rerun sass task in prod mode for CI #804

Merged
merged 1 commit into from
Aug 25, 2017
Merged

Conversation

rpowis
Copy link
Contributor

@rpowis rpowis commented Aug 25, 2017

Problem

After the refactoring of gulp tasks, the sass job doesn't build the production stylesheets during the build job.

Because the sass task is being run as a dependency of the test task, the global.runmode is set as the default dev. Due to this, the sass task doesn't minify the styles or put them in the assets/dist directory ready to be zipped and deployed.

Example Screenshot

image

Solution

By explicitly calling the sass task as a step in the build task it picks up the global.runmode = 'prod' setting and builds the styles for production.

Example Screenshot

image

Caveats

The sass task is being run twice as it's still a dependency of the test task. Ideally, the sass task would only be run once and then a separate minification step would be run for production.

That hasn't been done for this change as we need to get a fix out for missing styles quickly and introducing a new minification library could produce different output to the original sass job.

@rpowis rpowis changed the title Rerun sass task in prod mode for ci Rerun sass task in prod mode for CI Aug 25, 2017
@gordonmcmullan gordonmcmullan merged commit 36ce65d into master Aug 25, 2017
@rpowis rpowis deleted the fix-sass-build branch August 25, 2017 15:30
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