File tree 6 files changed +22
-9
lines changed
6 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ govukAssets::
110
110
npx nps copy.govukAssets
111
111
112
112
javascripts :
113
+ npm run build
113
114
rsync -r assets/javascripts static/
114
115
115
116
robots :
@@ -122,6 +123,7 @@ frontend:
122
123
make stylesheets
123
124
make govukAssets
124
125
rsync -r assets/images static/
126
+ cp node_modules/maplibre-gl/dist/maplibre-gl.css static/stylesheets/maplibre-gl.css
125
127
126
128
frontend-all : clean frontend
127
129
Original file line number Diff line number Diff line change 29
29
{% endblock %}
30
30
31
31
{%- block mapAssets %}
32
- < script src ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.js '> </ script >
33
- < link href ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.css ' rel ='stylesheet ' />
32
+ < script src ='/static/javascripts /maplibre-gl.js '> </ script >
33
+ < link href ='/static/stylesheets /maplibre-gl.css ' rel ='stylesheet ' />
34
34
< script src ='https://api.mapbox.com/mapbox.js/plugins/turf/v2.0.2/turf.min.js '> </ script >
35
35
{{ super() }}
36
36
{% endblock -%}
Original file line number Diff line number Diff line change 14
14
%}
15
15
16
16
{%- block mapAssets %}
17
- < script src ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.js '> </ script >
18
- < link href ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.css ' rel ='stylesheet ' />
17
+ < script src ='/static/javascripts /maplibre-gl.js '> </ script >
18
+ < link href ='/static/stylesheets /maplibre-gl.css ' rel ='stylesheet ' />
19
19
{{ super() }}
20
20
{% endblock -%}
21
21
Original file line number Diff line number Diff line change 12
12
{% from 'components/pagination/macro.jinja' import appPagination %}
13
13
14
14
{%- block mapAssets %}
15
- < script src ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.js '> </ script >
16
- < link href ='https://unpkg.com/maplibre-gl@latest/dist /maplibre-gl.css ' rel ='stylesheet ' />
15
+ < script src ='/static/javascripts /maplibre-gl.js '> </ script >
16
+ < link href ='/static/stylesheets /maplibre-gl.css ' rel ='stylesheet ' />
17
17
< script src ='https://api.mapbox.com/mapbox.js/plugins/turf/v2.0.2/turf.min.js '> </ script >
18
18
{{ super() }}
19
19
{% endblock -%}
Original file line number Diff line number Diff line change 31
31
"test" : " vitest run" ,
32
32
"coverage" : " vitest run --coverage" ,
33
33
"test-unit" : " vitest run --dir tests/unit/javascript" ,
34
- "test-integration" : " vitest run --dir tests/integration/javascript"
34
+ "test-integration" : " vitest run --dir tests/integration/javascript" ,
35
+ "build" : " rollup -c"
35
36
},
36
37
"dependencies" : {
37
38
"copyfiles" : " ^2.4.1" ,
38
39
"govuk-frontend" : " 4.2.0" ,
39
- "node-sass " : " ^9.0.0 " ,
40
- "nps " : " ^5.10 .0"
40
+ "maplibre-gl " : " ^4.1.2 " ,
41
+ "node-sass " : " ^9.0 .0"
41
42
},
42
43
"devDependencies" : {
43
44
"@vitest/coverage-v8" : " ^0.34.1" ,
Original file line number Diff line number Diff line change
1
+ // get the config object from the package file
2
+ module . exports = [
3
+ {
4
+ input : `./node_modules/maplibre-gl/dist/maplibre-gl.js` ,
5
+ output : {
6
+ file : `static/javascripts/maplibre-gl.js` ,
7
+ format : "iife" ,
8
+ }
9
+ } ,
10
+ ] ;
You can’t perform that action at this time.
0 commit comments