Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve rate limiting from unpkg by only recommending jsdelivr #932

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs-src/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import swal from 'sweetalert';

## CDN

You can also find SweetAlert on [unpkg](https://unpkg.com/sweetalert) and [jsDelivr](https://cdn.jsdelivr.net/npm/sweetalert) and use the global `swal` variable.
You can also find SweetAlert on [jsDelivr](https://cdn.jsdelivr.net/npm/sweetalert) and use the global `swal` variable.

```html
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert@latest/dist/sweetalert.min.js"></script>
```

# Getting started
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ <h2 id="npmyarn" class="deep-link"><a href="#npmyarn">NPM/Yarn</a></h2>
<p>Then, simply import it into your application:</p>
<div class="highlight javascript"><pre class="editor editor-colors"><div class="line"><span class="source js"><span class="meta import js"><span class="keyword control js"><span>import</span></span><span>&#xA0;</span><span class="variable other module js"><span>swal</span></span><span>&#xA0;</span><span class="keyword control js"><span>from</span></span><span>&#xA0;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&apos;</span></span><span>sweetalert</span><span class="punctuation definition string end js"><span>&apos;</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></div></pre></div>
<h2 id="cdn" class="deep-link"><a href="#cdn">CDN</a></h2>
<p>You can also find SweetAlert on <a href="https://unpkg.com/sweetalert">unpkg</a> and <a href="https://cdn.jsdelivr.net/npm/sweetalert">jsDelivr</a> and use the global <code>swal</code> variable.</p>
<div class="highlight html"><pre class="editor editor-colors"><div class="line"><span class="text html basic"><span class="meta tag any html"><span class="punctuation definition tag html"><span>&lt;</span></span><span class="entity name tag html"><span>script</span></span><span>&#xA0;</span><span class="entity other attribute-name html"><span>src</span></span><span>=</span><span class="string quoted double html"><span class="punctuation definition string begin html"><span>&quot;</span></span><span class="markup underline link https hyperlink"><span>https://unpkg.com/sweetalert/dist/sweetalert.min.js</span></span><span class="punctuation definition string end html"><span>&quot;</span></span></span><span class="punctuation definition tag html"><span>&gt;</span><span class="meta scope between-tag-pair html"><span>&lt;</span></span><span>/</span></span><span class="entity name tag html"><span>script</span></span><span class="punctuation definition tag html"><span>&gt;</span></span></span></span></div></pre></div>
<p>You can also find SweetAlert on <a href="https://cdn.jsdelivr.net/npm/sweetalert">jsDelivr</a> and use the global <code>swal</code> variable.</p>
<div class="highlight html"><pre class="editor editor-colors"><div class="line"><span class="text html basic"><span class="meta tag any html"><span class="punctuation definition tag html"><span>&lt;</span></span><span class="entity name tag html"><span>script</span></span><span>&#xA0;</span><span class="entity other attribute-name html"><span>src</span></span><span>=</span><span class="string quoted double html"><span class="punctuation definition string begin html"><span>&quot;</span></span><span class="markup underline link https hyperlink"><span>https://cdn.jsdelivr.net/npm/sweetalert@latest/dist/sweetalert.min.js</span></span><span class="punctuation definition string end html"><span>&quot;</span></span></span><span class="punctuation definition tag html"><span>&gt;</span><span class="meta scope between-tag-pair html"><span>&lt;</span></span><span>/</span></span><span class="entity name tag html"><span>script</span></span><span class="punctuation definition tag html"><span>&gt;</span></span></span></span></div></pre></div>
<h1 id="getting-started" class="deep-link"><a href="#getting-started">Getting started</a></h1>
<h2 id="showing-an-alert" class="deep-link"><a href="#showing-an-alert">Showing an alert</a></h2>
<p>After importing the files into your application, you can call the <code>swal</code> function (make sure it&apos;s called <em>after</em> the DOM has loaded!)</p>
Expand Down