Skip to content

Commit

Permalink
docs: add umd url
Browse files Browse the repository at this point in the history
  • Loading branch information
sivan committed Mar 4, 2020
1 parent 6b0f3d4 commit 2f6d745
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Thumbs.db

# Dist files
dist/
umd/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` 的类名即可:。
```
Expand Down
4 changes: 2 additions & 2 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h2 id="usage">使用方法<a class="anchor" href="#usage">#</a></h2>
<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>的类名即可:
Expand Down Expand Up @@ -468,7 +468,7 @@ <h3 id="javascript">增强脚本<sup>beta</sup><a class="anchor" href="#javascri
<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();
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 2f6d745

Please sign in to comment.