-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add decision record about JavaScript file names and formats #28
Conversation
|
||
We will use ECMAScript (ES) modules by default and only bundle JavaScript files that are considered "entry points" into GOV.UK Frontend, such as `all.mjs` and exported components (for example `accordion.mjs`). | ||
|
||
We will deprecate the Universal Module Definition (UMD) format in a future release. |
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 talked about this, but I think we should focus decision records on things we've decided to do now, and avoid making future-looking statements.
(I'd be happy to mention it as a future possibility elsewhere in the doc, just not including it in the decision)
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.
Ah this was one of @romaricpascal's decisions that we'd deprecate UMD + window globals in future
Will remove
1. Add prefix `.bundle` to bundled JavaScript file extensions | ||
2. Add prefix `.min` to minified JavaScript file extensions | ||
|
||
We will add our [GitHub release](https://github.com/alphagov/govuk-frontend/releases) JavaScript to the [`govuk-frontend` npm package](https://www.npmjs.com/package/govuk-frontend). |
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.
Think it's worth being clearer about what's being included from the package – as far as I recall it's just the minified JS?
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.
Sorry, our paths crossed and it was a post-sports day change to add the directory listing example 😊
Pushed up a bit more now
**Date:** 2023-06-27 | ||
|
||
**Status:** accepted |
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 raised #29 to fix this in the template, but can be bump the date and status to the top of the doc, and sentence case the status?
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.
Spotted it, pushed 👍
9663868
to
fb73771
Compare
fb73771
to
4de56b8
Compare
4de56b8
to
0e96958
Compare
Bringing this back out of draft now @36degrees @claireashworth |
0e96958
to
78d75b9
Compare
b5a86f8
to
0414f02
Compare
78d75b9
to
3c81c98
Compare
Thanks @36degrees Do we need to mention that the bundled code is still full of (quite large) comment blocks? |
I don't think so, unless you think it's relevant for the overall decision (i.e. if it was somehow a factor in what we decided, or is tied in the implications)? |
It was flagged during, but not really related to this decision |
2698730
to
c016c51
Compare
3c81c98
to
f0360ee
Compare
Closes: #26