-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update unpkg urls
- Loading branch information
Showing
8 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,7 @@ curl -so- https://raw.githubusercontent.com/18alantom/strawberry/main/setup.sh | | |
Or if you wanna just use it straight away, copy this 👇 script tag in the head of your html file: | ||
|
||
```html | ||
<script src="https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js"></script> | ||
<script src="https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js"></script> | ||
``` | ||
|
||
## Features | ||
|
@@ -79,7 +79,7 @@ Here're are a few of its features: | |
|
||
1. **Reactivity**: change your data and the UI updates. | ||
2. **Composability**: create and use components. | ||
3. **Build-free**: doesn't require a build-step. Link or [copy the lib](https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js) and you're ready to go. | ||
3. **Build-free**: doesn't require a build-step. Link or [copy the lib](https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js) and you're ready to go. | ||
4. **Zero Dependencies**: has no dependencies. Uses WebAPIs for everything. | ||
5. **Tiny**: [source code](https://github.com/18alantom/strawberry/blob/main/index.ts) is under 1000 CLOC. | ||
6. **No VDOM**: directly updates the DOM. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Let's start with a simple example, I'll explain what's going on after I show you | |
```html | ||
<!-- 1. Link Strawberry --> | ||
<head> | ||
<script src="https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js"></script> | ||
<script src="https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js"></script> | ||
</head> | ||
|
||
<!-- 2. Define a Component --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ If you want to add the functionality of Strawberry to an existing `html` documen | |
Add a link to Strawberry to you html's `head` tag: | ||
|
||
```html | ||
<script src="https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js"></script> | ||
<script src="https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js"></script> | ||
``` | ||
|
||
Or you can download [this file](https://raw.githubusercontent.com/18alantom/strawberry/main/dist/sb.min.js) and add a `script:src` that links to the copy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<!-- 1. Link Strawberry --> | ||
<head> | ||
<script src="https://unpkg.com/[email protected].0-alpha.1/dist/sb.min.js"></script> | ||
<script src="https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js"></script> | ||
</head> | ||
|
||
<!-- 2. Define a Component --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ set -e | |
|
||
cd website | ||
|
||
curl -so sb.min.js https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js | ||
curl -so sb.min.js https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js | ||
curl -so highlight.min.js https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ fi | |
mkdir sb-starter | ||
cd sb-starter | ||
|
||
curl -so sb.min.js https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js | ||
curl -so sb.min.js https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js | ||
index_html=$(cat <<EOF | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -191,7 +191,7 @@ <h2>Link Setup</h2> | |
To use a link, copy and paste the following script tag at the top of | ||
your <code>index.html</code>: | ||
</p> | ||
<pre><code class="copy hljs nohighlight" data-copy="Copy"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/[email protected].1-alpha.0/dist/sb.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre> | ||
<pre><code class="copy hljs nohighlight" data-copy="Copy"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/[email protected].2-alpha.0/dist/sb.min.js"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span></code></pre> | ||
<p> | ||
Once that is done the <code>window.sb</code> object should be defined. | ||
</p> | ||
|