docs: add umd url

This commit is contained in:
Sivan 2020-03-04 14:22:43 +08:00 committed by GitHub
commit 1e69bd7f06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ Thumbs.db
# Dist files
dist/
umd/

View file

@ -22,7 +22,7 @@
1. 在页面的 `<head>` 标签中引入 `heti.css` 文件:
```
<link rel="stylesheet" href="./dist/heti.min.css">
<link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css">
```
1. 在要作用的容器元素上增加 `class="heti"` 的类名即可:。
```

View file

@ -69,7 +69,7 @@
<ol>
<li>
在页面的<code>&lt;/head&gt;</code>标签前中引入<code>heti.css</code>样式文件:
<pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;./heti.css&quot;&gt;</code></pre>
<pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;//unpkg.com/heti/umd/heti.min.css&quot;&gt;</code></pre>
</li>
<li>
在要作用的容器元素上增加<code>class="heti"</code>的类名即可:
@ -468,7 +468,7 @@
<details>
<summary>查看使用说明</summary>
<p>在页面的<code>&lt;/body&gt;</code>标签前引入JavaScript脚本:</p>
<pre><code>&lt;script src=&quot;./heti-addon.min.js&quot;&gt;&lt;/script&gt;
<pre><code>&lt;script src=&quot;//unpkg.com/heti/umd/heti-addon.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
const heti = new Heti();
heti.autoSpacing();

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "heti",
"version": "0.4.0",
"version": "0.4.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -5,13 +5,14 @@
"main": "lib/heti.scss",
"files": [
"dist",
"umd",
"add-ons",
"lib"
],
"scripts": {
"start": "node-sass -w --output-style=expanded lib/heti.scss _site/heti.css",
"compile": "rollup -c -w",
"build:style": "node-sass lib/heti.scss dist/heti.min.css --output-style=compressed",
"build:style": "node-sass lib/heti.scss umd/heti.min.css --output-style=compressed",
"build:script": "rollup -c",
"build": "npm run build:style && npm run build:script",
"test": "npx stylelint --config package.json 'lib/**/*.scss'"

View file

@ -11,7 +11,7 @@ export default {
format: 'umd'
},
{
file: 'dist/heti-addon.min.js',
file: 'umd/heti-addon.min.js',
format: 'umd',
name: 'Heti',
plugins: [