-
Notifications
You must be signed in to change notification settings - Fork 319
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
Remove dev styling from compiled css and update pipeline #560
Conversation
@@ -0,0 +1,5 @@ | |||
// If you want to display the currently active breakpoint in the top |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason these aren't using the existing app stylesheets, which are now not being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the task to compile css for dist and review app is the same. tried using the same entry point for both and couldn't find a way to not include breakpoints in dist compiled and include them in review compiled
we might also want to add and more styles currently in views into app*.scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
govuk-frontend*.scss files are used for compilation to dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The govuk-frontend*.scss
files in the app folder are used for compilation to dist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. happy to find a better place for them.
they used to be in globals and we were filtering them from copy task.
tasks/gulp/compile-assets.js
Outdated
@@ -31,9 +30,20 @@ const errorHandler = function (error) { | |||
this.once('finish', () => process.exit(1)) | |||
this.emit('end') | |||
} | |||
// used only for review app as they include showing of media queries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing app assets seem to be getting compiled OK, so not sure why this is needed.
tasks/gulp/compile-assets.js
Outdated
@@ -54,42 +64,6 @@ gulp.task('scss:compile', () => { | |||
}) | |||
)) | |||
.pipe(gulp.dest(taskArguments.destination + '/css/')) | |||
|
|||
let compileOldIe = gulp.src(configPaths.app + 'assets/scss/govuk-frontend-old-ie.scss') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this is being removed as part of this PR. Don't we still need an old-ie stylesheet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still have old ie stylesheet. oldie was not doing anything that we don't currently do already: (flatten mq's, use rems)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can that change be made in a separate PR? It doesn't seem related to the other changes.
(I think there are some things oldie might be doing or should be doing – patching ::before
into :before
(which is currently disabled??), changing opacity to filters – but I don't want to hold this PR up)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, can leave it in and will add required merge-stream back in
lib/file-helper.js
Outdated
|
||
// Read the contents of a file from a given path | ||
const readFileContents = filePath => { | ||
const contents = fs.readFileSync(filePath, 'utf8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just return fs.readFileSync(filePath, 'utf8')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah could do
0eb3072
to
95cbdc8
Compare
95cbdc8
to
eb6d56b
Compare
reverted removing oldie compilation |
@36degrees forgot to add changelog. still ok with it? |
53f7266
to
177215a
Compare
LGTM. |
We don't want dev specific css in compiled output in
dist
, as observed in user research.This PR addresses this by:
$mq-show-breakpoints
is includedscss:compile
task to use eitherapp*.scss
orgovuk-frontend*.scss
files as source for compilationAdditionally:
gulp-replace
and gulp-replaces from dependenciesthe flow is now as follows:
dev
then compile app*.scss with mq-show-breapointsand anthing else we might want to include in teh review appdist
then compile govuk-frontend*.scss without mq-show-breakpointsThis should also address #556
https://trello.com/c/woTnvOTx/801-remove-active-breakpoint-debug-helper-from-dist-css