Skip to content

Commit 4b8a7dd

Browse files
committed
docs(web): update web setup to use local asset instead of CDN
- Update README.md with preferred local asset path for v1.3.1+ - Add CDN link as alternative option in documentation - Update example/web/index.html to use local asset path - Upgrade system_date_time_format dependency to 1.3.1
1 parent 4a10a45 commit 4b8a7dd

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,26 @@ class App extends HookWidget {
7373
7474
### Web
7575

76-
In order to use this plugin on web app you need to add `system_date_time_format.js` script to your `index.html`:
76+
In order to use this plugin on web app you need to add `system_date_time_format.js` script to your `index.html`.
77+
78+
**From version 1.3.1 and above**, the preferred way is to use the local asset:
7779
```html
78-
<src="https://cdn.jsdelivr.net/gh/Nikoro/system_date_time_format@main/web/system_date_time_format.min.js"></script>
80+
<script src="./assets/packages/system_date_time_format/web/system_date_time_format.min.js"></script>
7981
```
82+
83+
Alternatively, you can still use the CDN link:
84+
```html
85+
<script src="https://cdn.jsdelivr.net/gh/Nikoro/system_date_time_format@main/web/system_date_time_format.min.js"></script>
86+
```
87+
8088
index.html
8189

8290
```html
8391
<!DOCTYPE html>
8492
<html>
8593
<head>
8694
<!--...-->
87-
<src="https://cdn.jsdelivr.net/gh/Nikoro/system_date_time_format@main/web/system_date_time_format.min.js"></script>
95+
<script src="./assets/packages/system_date_time_format/web/system_date_time_format.min.js"></script>
8896
</head>
8997
<body>
9098
<!--...-->

example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ packages:
8484
dependency: transitive
8585
description:
8686
name: system_date_time_format
87-
sha256: "52215aefc86485502327f1b25ae690cb87ac20f6441c95b64fa2995341084aad"
87+
sha256: "7babc966b1e2637e5e4fc449819b7d6a861e3794591baeb167b2be59cee2cbca"
8888
url: "https://pub.dev"
8989
source: hosted
90-
version: "1.3.0"
90+
version: "1.3.1"
9191
system_date_time_format_hook:
9292
dependency: "direct main"
9393
description:

example/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<title>system_date_time_format_hook_example</title>
3333
<link rel="manifest" href="manifest.json">
34-
<script src="https://cdn.jsdelivr.net/gh/Nikoro/system_date_time_format@main/web/system_date_time_format.min.js"></script>
34+
<script src="./assets/packages/system_date_time_format/web/system_date_time_format.min.js"></script>
3535
</head>
3636
<body>
3737
<script src="flutter_bootstrap.js" async></script>

0 commit comments

Comments
 (0)