2.0.22 • Published 2 years ago

ewt-mobile v2.0.22

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ewt 整包

Install

$ npm i @ewtm/ewtm

Usage

import {
  Icon,
  EmptyData,
} from '@ewtm/ewtm';
import '@ewtm/ewtm/dist/index.css';

按需加载

安装 babel-plugin-import 插件

npm install babel-plugin-import --save-dev

.babelrc 文件配置如下

{
  "plugins": [
    [ "import", {
        "libraryName": "@ewtm/ewtm"
      }
    ]
  ]
}

加入新组件流程

  1. 复制模板组件 ./src/components/Template 并重名;
  2. 更新 ./src/index.ts 加入该组件;
  3. 更新 ./development/index.tsx 加入组件demo示例,开发、调试;
  4. 调试结束后,执行 npm version patch 升级组件库版本;
  5. 发布,执行命令 npm publish;

更新文档

  1. 执行 npm run build:site;
  2. 将生成的最新的 ./site 目录中的内容拷贝到文档站的 git 仓库 release 分支的 dist 目录下,文档站仓库地址是:ssh://git@git.mistong.com:10022/ewtm/mobile.git
  3. 将文档站代码推到远端 git 仓库;
  4. 前往发布平台搜索 mobile,发布 release 分支即可;