-
Notifications
You must be signed in to change notification settings - Fork 24
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
docs: review all production guidance #1252
base: main
Are you sure you want to change the base?
Conversation
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-upgrade-sass-modules.apps.live.cloud-platform.service.justice.gov.uk Username: |
$moj-assets-path: "/application/assets/"; | ||
|
||
@import "@ministryofjustice/frontend/moj/all"; | ||
@forward "node_modules/@ministryofjustice/frontend/moj/all"; |
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 it worth using the @forward.... with
here and retaining the assets path bit? I know its not strictly necessary but it makes it super obvious to someone how to set their own assets path without having to read the specific css page.
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've adapted it a bit and linked to the specific CSS page for more info
$moj-fonts-path: "/fonts/"; | ||
|
||
@import "@ministryofjustice/frontend/moj/all"; | ||
@forward "node_modules/@ministryofjustice/frontend/moj/components/button-menu/button-menu"; | ||
``` | ||
|
||
## Importing JavaScript |
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.
It won't let me comment on the line itself as it's not a change, but the link below this 'setting up javascript' - we've changed the title of the page (to Importing MOJ Jrontend Javascript IIRC)
de85dbb
to
3d34875
Compare
2648113
to
a781a3a
Compare
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-upgrade-sass-modules.apps.live.cloud-platform.service.justice.gov.uk Username: |
4d8e9f9
to
0c51c38
Compare
a781a3a
to
eb17538
Compare
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-upgrade-sass-modules.apps.live.cloud-platform.service.justice.gov.uk Username: |
eb17538
to
a4485a8
Compare
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-upgrade-sass-modules.apps.live.cloud-platform.service.justice.gov.uk Username: |
a4485a8
to
13df02f
Compare
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-upgrade-sass-modules.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
||
Example 1: | ||
3. Import the files before the closing `</body>` tag of your page template, then run the `initAll` functions to initialise all the components. For example: |
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 we say to put them at the bottom of the body element? I thought that was an anti-pattern nowadays as it prevents the preload scanner/parser from discovering the scripts early and script type="module"
is defer
by default.
Various changes (lots of fixes) for the Sass module breaking release
Documentation has largely been updated using:
https://frontend.design-system.service.gov.uk
4.0.0 (Breaking release)
Support for Sass modules
In this release we’ve updated our Sass files to use the Sass module system.
To prevent breaking changes, you should update to Dart Sass from older compilers:
For Ruby on Rails users, see the
dartsass-rails
ordartsass-sprockets
gem for asset pipeline compatibiliity.