FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
basemaps/.github/check_examples.py at main · protomaps/basemaps · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
protomaps
/
basemaps
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
102
Star
734
Code
Issues
27
Pull requests
12
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
basemaps
/
.github
/
check_examples.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (21 loc) · 622 Bytes
Breadcrumbs
basemaps
/
.github
/
check_examples.py
Copy path
File metadata and controls
27 lines (21 loc) · 622 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import
json
import
glob
import
re
fail
=
0
for
package
in
glob
.
glob
(
"**/package.json"
,
recursive
=
True
):
if
"node_modules"
in
package
:
continue
with
open
(
package
,
"r"
)
as
f
:
j
=
json
.
loads
(
f
.
read
())
name
=
j
[
"name"
]
version
=
j
[
"version"
]
for
html
in
glob
.
glob
(
"**/*.html"
,
recursive
=
True
):
if
"node_modules"
in
html
:
continue
with
open
(
html
,
"r"
)
as
f
:
matches
=
re
.
findall
(
"https://unpkg.com/"
+
name
+
r"@(\d+\.\d+\.\d+|latest)/"
,
f
.
read
())
for
match
in
matches
:
if
matches
[
0
]
==
"latest"
or
matches
[
0
]
!=
version
:
print
(
html
,
"should be"
,
version
,
"was"
,
matches
)
fail
=
1
exit
(
fail
)
Back
|
FazBrowse Home
|
New Git URL