Update ripple-lib dependency in templates:

- Use variable in more places
- Move lodash dep to a variable with integrity check
- Update examples in some places that refer to 1.8.0
This commit is contained in:
mDuo13
2021-03-03 15:23:36 -08:00
parent 2541b59e58
commit 45e9ddd3a8
9 changed files with 28 additions and 25 deletions

View File

@@ -6,8 +6,9 @@ The following example gets the latest [ledger version](ledgers.html) and a list
**Tip:** If you can, open your browser's Developer Tools by pressing **F12**. The "Console" tab provides a native JavaScript console and can give insight into what code is running on any webpage.
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.js"></script>
<script src="https://unpkg.com/ripple-lib@1.8.0/build/ripple-latest-min.js"></script>
<!-- ripple-lib & prerequisites -->
{{currentpage.lodash_tag}}
{{currentpage.ripple_lib_tag}}
<!-- JS_EDITOR_START step2 -->
@@ -94,8 +95,8 @@ Try editing the code above to do something different:
This page has the necessary prerequisites already loaded, but you can access the XRP Ledger from **any webpage** if you load [Lodash](https://lodash.com/) and [RippleAPI for JavaScript (ripple-lib)](rippleapi-reference.html) in that page's HTML. For example:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.js"></script>
<script src="https://unpkg.com/ripple-lib@1.8.0/build/ripple-latest-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<script src="https://unpkg.com/ripple-lib@1.9.1/build/ripple-latest-min.js"></script>
```
<!-- SPELLING_IGNORE: lodash -->