Skip to content

Commit c4e8bdc

Browse files
committed
chore: update docs
1 parent 7da9206 commit c4e8bdc

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

site/app/src/docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Create an `index.html` file and copy the following between the `<body>` tags.
1212
<div id="content"></div>
1313

1414
<script type="module">
15-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
15+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
1616
const markdownToRender = `# FicusJS script loader
1717
1818
Dynamically load ES modules and ES5 scripts.
@@ -38,4 +38,4 @@ loadScript('https://unpkg.com/marked@1.2.0/lib/marked.esm.js')
3838

3939
> Alternatively, fork this Codepen to see it in action - [https://codepen.io/ducksoupdev/pen/abZbdbq](https://codepen.io/ducksoupdev/pen/abZbdbq)
4040
41-
The example creates a set of page components, a page navigation component and a new router using hash mode.
41+
The example imports the [marked](https://www.npmjs.com/package/marked) ES module and converts some markdown to HTML.

site/app/src/docs/script.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Alternatively, you can use the NPM package CDN named [Unpkg](https://unpkg.com/)
2222
To use the [marked](https://www.npmjs.com/package/marked) package which provides an ES6 module:
2323

2424
```js
25-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
25+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
2626

2727
// ES6 module - uses *.esm.js file name convention
2828
// this script won't load if ES6 is not supported
@@ -54,7 +54,7 @@ the `loadScript` function can load ES6 modules, ES5 scripts or both.
5454
You can load single or multiple scripts.
5555

5656
```js
57-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
57+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
5858

5959
// load single script
6060
loadScript('/js/script1.esm.js')
@@ -80,7 +80,7 @@ loadScript(
8080
An example of using `loadScript` in a route.
8181

8282
```js
83-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
83+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
8484
import { createRouter } from 'https://unpkg.com/ficusjs-router?module'
8585

8686
// use the loadScript to load an ES6 module for a route
@@ -103,7 +103,7 @@ Using the `loadScript` function to load ES6 modules can be done in two ways:
103103
Loading ES6 modules is used to import bindings which are exported by the module.
104104

105105
```js
106-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
106+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
107107

108108
// using the file name convention of *.esm.js
109109
loadScript('./views/home.esm.js')
@@ -157,7 +157,7 @@ Using the `loadScript` function to load ES6 modules with an ES5 fallback will de
157157
To use this feature, you need to pass a two-item `Array` - the first item is the ES6 module and the second item is the ES5 fallback script:
158158

159159
```js
160-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
160+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
161161

162162
// load scripts based on file names
163163
loadScript(
@@ -206,7 +206,7 @@ Using the `loadScript` function to load ES5 scripts can be done in two ways:
206206
2. Using an object to optionally disable caching
207207

208208
```js
209-
import { loadScript } from 'https://unpkg.com/ficusjs-script?module'
209+
import { loadScript } from 'https://unpkg.com/ficusjs-script@1.0.1/dist/script.js'
210210

211211
// using the file name convention of *.esm.js
212212
loadScript('./views/home.iife.js')

0 commit comments

Comments
 (0)