docs: add umd url
This commit is contained in:
commit
1e69bd7f06
6 changed files with 8 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,3 +21,4 @@ Thumbs.db
|
||||||
|
|
||||||
# Dist files
|
# Dist files
|
||||||
dist/
|
dist/
|
||||||
|
umd/
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
1. 在页面的 `<head>` 标签中引入 `heti.css` 文件:
|
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"` 的类名即可:。
|
1. 在要作用的容器元素上增加 `class="heti"` 的类名即可:。
|
||||||
```
|
```
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
在页面的<code></head></code>标签前中引入<code>heti.css</code>样式文件:
|
在页面的<code></head></code>标签前中引入<code>heti.css</code>样式文件:
|
||||||
<pre><code><link rel="stylesheet" href="./heti.css"></code></pre>
|
<pre><code><link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css"></code></pre>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
在要作用的容器元素上增加<code>class="heti"</code>的类名即可:
|
在要作用的容器元素上增加<code>class="heti"</code>的类名即可:
|
||||||
|
@ -468,7 +468,7 @@
|
||||||
<details>
|
<details>
|
||||||
<summary>查看使用说明</summary>
|
<summary>查看使用说明</summary>
|
||||||
<p>在页面的<code></body></code>标签前引入JavaScript脚本:</p>
|
<p>在页面的<code></body></code>标签前引入JavaScript脚本:</p>
|
||||||
<pre><code><script src="./heti-addon.min.js"></script>
|
<pre><code><script src="//unpkg.com/heti/umd/heti-addon.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const heti = new Heti();
|
const heti = new Heti();
|
||||||
heti.autoSpacing();
|
heti.autoSpacing();
|
||||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "heti",
|
"name": "heti",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -5,13 +5,14 @@
|
||||||
"main": "lib/heti.scss",
|
"main": "lib/heti.scss",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
"umd",
|
||||||
"add-ons",
|
"add-ons",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node-sass -w --output-style=expanded lib/heti.scss _site/heti.css",
|
"start": "node-sass -w --output-style=expanded lib/heti.scss _site/heti.css",
|
||||||
"compile": "rollup -c -w",
|
"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:script": "rollup -c",
|
||||||
"build": "npm run build:style && npm run build:script",
|
"build": "npm run build:style && npm run build:script",
|
||||||
"test": "npx stylelint --config package.json 'lib/**/*.scss'"
|
"test": "npx stylelint --config package.json 'lib/**/*.scss'"
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
||||||
format: 'umd'
|
format: 'umd'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
file: 'dist/heti-addon.min.js',
|
file: 'umd/heti-addon.min.js',
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
name: 'Heti',
|
name: 'Heti',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
Loading…
Reference in a new issue