Commit 451e1c9 1 parent 338d98f commit 451e1c9 Copy full SHA for 451e1c9
File tree 9 files changed +32
-26
lines changed
packages/govuk-frontend-review
9 files changed +32
-26
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default defineConfig(({ i: input }) => ({
14
14
* Output options
15
15
*/
16
16
output : {
17
- format : 'iife ' ,
17
+ format : 'es ' ,
18
18
19
19
/**
20
20
* Output plugins
Original file line number Diff line number Diff line change 1
- import * as GOVUKFrontend from 'govuk-frontend'
2
-
3
- // @ts -expect-error Manually add globals to window for tests
4
- window . GOVUKFrontend = GOVUKFrontend
1
+ export * from 'govuk-frontend'
Original file line number Diff line number Diff line change 45
45
{% endblock %}
46
46
47
47
{% block bodyEnd %}
48
- <script type =" module" src =" /javascripts/all.min.js " ></script >
48
+ <script type =" module" src =" /javascripts/all.bundle. min.mjs " ></script >
49
49
<script type =" module" >
50
+ import { initAll } from ' /javascripts/all.bundle.min.mjs'
50
51
const $scope = document .getElementById (' scoped' )
51
- window .GOVUKFrontend .initAll ({
52
- scope: $scope
53
- })
52
+ initAll ({ scope: $scope })
54
53
</script >
55
54
{% endblock %}
Original file line number Diff line number Diff line change 121
121
122
122
{% block bodyEnd %}
123
123
<!-- block:bodyEnd -->
124
- <script type =" module" src =" /javascripts/all.min.js" ></script >
125
- <script type =" module" >window .GOVUKFrontend .initAll () </script >
124
+ <script type =" module" src =" /javascripts/all.bundle.min.mjs" ></script >
125
+ <script type =" module" >
126
+ import { initAll } from ' /javascripts/all.bundle.min.mjs'
127
+ initAll ()
128
+ </script >
126
129
<!-- endblock:bodyEnd -->
127
130
{% endblock %}
Original file line number Diff line number Diff line change 12
12
13
13
{% block bodyEnd %}
14
14
<!-- block:bodyEnd -->
15
- <script type =" module" src =" /javascripts/all.min.js" ></script >
16
- <script type =" module" >window .GOVUKFrontend .initAll () </script >
15
+ <script type =" module" src =" /javascripts/all.bundle.min.mjs" ></script >
16
+ <script type =" module" >
17
+ import { initAll } from ' /javascripts/all.bundle.min.mjs'
18
+ initAll ()
19
+ </script >
17
20
<!-- endblock:bodyEnd -->
18
21
{% endblock %}
Original file line number Diff line number Diff line change 937
937
{% endblock %}
938
938
939
939
{% block bodyEnd %}
940
- <script type =" module" src =" /javascripts/all.min.js " ></script >
940
+ <script type =" module" src =" /javascripts/all.bundle. min.mjs " ></script >
941
941
<script type =" module" >
942
- window .GOVUKFrontend .initAll ({
942
+ import { initAll } from ' /javascripts/all.bundle.min.mjs'
943
+ initAll ({
943
944
accordion: {
944
945
i18n: {
945
- showAllSections: " Dangos adrannau" ,
946
- hideAllSections: " Cuddio adrannau" ,
946
+ showAllSections: ' Dangos adrannau' ,
947
+ hideAllSections: ' Cuddio adrannau' ,
947
948
},
948
- " i18n.showSection" : " Dangos" ,
949
- " i18n.showSectionAriaLabel" : " Dangos adran" ,
950
- " i18n.hideSection" : " Cuddio" ,
951
- " i18n.hideSectionAriaLabel" : " Cuddio adran"
949
+ ' i18n.showSection' : ' Dangos' ,
950
+ ' i18n.showSectionAriaLabel' : ' Dangos adran' ,
951
+ ' i18n.hideSection' : ' Cuddio' ,
952
+ ' i18n.hideSectionAriaLabel' : ' Cuddio adran'
952
953
}
953
954
})
954
955
</script >
Original file line number Diff line number Diff line change 15
15
{% set mainClasses = ' govuk-main-wrapper--auto-spacing' %}
16
16
17
17
{% block bodyEnd %}
18
- <script type =" module" src =" /javascripts/all.min.js" ></script >
19
- <script type =" module" >window .GOVUKFrontend .initAll () </script >
18
+ <script type =" module" src =" /javascripts/all.bundle.min.mjs" ></script >
19
+ <script type =" module" >
20
+ import { initAll } from ' /javascripts/all.bundle.min.mjs'
21
+ initAll ()
22
+ </script >
20
23
{% endblock %}
Original file line number Diff line number Diff line change 14
14
{% endblock %}
15
15
16
16
{% block scripts %}
17
- <script type =" module" src =" /javascripts/all.min.js " ></script >
17
+ <script type =" module" src =" /javascripts/all.bundle. min.mjs " ></script >
18
18
{% endblock %}
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ export const compile = (options) => gulp.series(
18
18
destPath : join ( options . destPath , 'javascripts' ) ,
19
19
configPath : join ( options . basePath , 'rollup.config.mjs' ) ,
20
20
21
- // Rename with `*.min.js ` extension
21
+ // Rename with `*.bundle. min.mjs ` extension
22
22
filePath ( { dir, name } ) {
23
- return join ( dir , `${ name } .min.js ` )
23
+ return join ( dir , `${ name } .bundle. min.mjs ` )
24
24
}
25
25
} )
26
26
) ,
You can’t perform that action at this time.
0 commit comments