Skip to content

Commit 71aefbf

Browse files
committed
update cdn links
1 parent 981e2dc commit 71aefbf

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
## Usage
1818

19+
`petite-vue` can be used without a build step. Simply load it from a CDN:
20+
1921
```html
2022
<script src="https://unpkg.com/petite-vue" defer init></script>
2123

@@ -50,6 +52,15 @@ Or, use the ES module build:
5052
</script>
5153
```
5254

55+
### Production CDN URLs
56+
57+
The short CDN URL is meant for prototyping. For production usage, use a fully resolved CDN URL to avoid resolving and redirect cost:
58+
59+
- Global build: `https://unpkg.com/[email protected]/dist/petite-vue.iife.js`
60+
- exposes `PetiteVue` global, supports auto init
61+
- ESM build: `https://unpkg.com/[email protected]/dist/petite-vue.es.js`
62+
- Must be used with `<script type="module">`
63+
5364
### Root Scope
5465

5566
The `createApp` function accepts a data object that serves as the root scope for all expressions. This can be used to bootstrap simple, one-off apps:

examples/markdown.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script src="https://unpkg.com/marked"></script>
2-
<script src="https://unpkg.com/lodash"></script>
1+
<script src="https://unpkg.com/marked@2.1.3/lib/marked.js"></script>
2+
<script src="https://unpkg.com/lodash@4.17.21/lodash.min.js"></script>
33
<script type="module">
44
import { createApp } from '../src'
55

examples/todomvc.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css/index.css" />
1+
<link
2+
rel="stylesheet"
3+
href="https://unpkg.com/[email protected]/index.css"
4+
/>
25
<style>
36
[v-cloak] {
47
display: none;

0 commit comments

Comments
 (0)