diff --git a/.gitignore b/.gitignore index 7d572b7..2743717 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ Thumbs.db # Dist files dist/ +umd/ diff --git a/README.md b/README.md index 698b855..ec7ea5c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ 1. 在页面的 `` 标签中引入 `heti.css` 文件: ``` - + ``` 1. 在要作用的容器元素上增加 `class="heti"` 的类名即可:。 ``` diff --git a/_site/index.html b/_site/index.html index 9e44c51..d4e4123 100644 --- a/_site/index.html +++ b/_site/index.html @@ -69,7 +69,7 @@
  1. 在页面的</head>标签前中引入heti.css样式文件: -
    <link rel="stylesheet" href="./heti.css">
    +
    <link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css">
  2. 在要作用的容器元素上增加class="heti"的类名即可: @@ -468,7 +468,7 @@
    查看使用说明

    在页面的</body>标签前引入JavaScript脚本:

    -
    <script src="./heti-addon.min.js"></script>
    +        
    <script src="//unpkg.com/heti/umd/heti-addon.min.js"></script>
     <script>
       const heti = new Heti();
       heti.autoSpacing();
    diff --git a/package-lock.json b/package-lock.json
    index b891398..9cc6bc6 100644
    --- a/package-lock.json
    +++ b/package-lock.json
    @@ -1,6 +1,6 @@
     {
       "name": "heti",
    -  "version": "0.4.0",
    +  "version": "0.4.1",
       "lockfileVersion": 1,
       "requires": true,
       "dependencies": {
    diff --git a/package.json b/package.json
    index 83d4c5f..3b5e1f4 100644
    --- a/package.json
    +++ b/package.json
    @@ -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'"
    diff --git a/rollup.config.js b/rollup.config.js
    index f69b0b5..f773cad 100644
    --- a/rollup.config.js
    +++ b/rollup.config.js
    @@ -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: [