# bitsino-ui

> A Component Library for Vue.js.

Latest version **0.2.3** (published 2021-02-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install bitsino-ui
pnpm add bitsino-ui
yarn add bitsino-ui
bun add bitsino-ui
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2021-02-02 |
| First published | 2021-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 78.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | z_praise |
| Keywords | bitsino, vue, components |

## Links

- npm: https://www.npmjs.com/package/bitsino-ui
- npm.io page: https://npm.io/package/bitsino-ui

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [vuex](https://npm.io/package/vuex.md) ^3.6.0
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vue-hljs](https://npm.io/package/vue-hljs.md) ^1.1.2

## Recent versions

- 0.2.3 (latest) — 2021-02-02
- 0.2.2 — 2021-01-29
- 0.2.1 — 2021-01-27
- 0.2.0 — 2021-01-27
- 0.1.52 — 2021-01-26
- 0.1.51 — 2021-01-26
- 0.1.5 — 2021-01-26
- 0.1.4 — 2021-01-26
- 0.1.3 — 2021-01-26
- 0.1.2 — 2021-01-26
- 0.1.1 — 2021-01-26
- 0.1.0 — 2021-01-26

## README

# 一、目录结构

    bitsino-ui
    |--examples //示例展示
    |--packages //存放组件
        ...
        |--index.js // 整合所有组件并导出
    |--public
    |--.gitignore
    |--babel.config.js
    |--package.json
    |--package-lock.json
    |--README.md
    |--vue.config.js //所有的对项目和webpack的配置

# 二、packages 编写组件
/packages

    packages
    |--alrt //示例组件
        |--src
            |--index.vue
        |--index.js // 导出单个组件
    |--index.js //整合所有组件并导出


# 三、examples 示例展示

## 引入
/examples/main.js

```javascript
import BitsinoUi from '../packages'
Vue.use(BitsinoUi)
```
`npm run serve`启动项目

# 四、打包
vue-cli3 提供了一个[库文件打包命令](https://cli.vuejs.org/zh/guide/build-targets.html#%E5%BA%93)

主要的有四个参数

    1.target：默认为构建应用，改为 `lib` 即可启用构建库模式
    2.name：输出文件名
    3.dest：输出目录，默认为 `dist`，这里我们改为 `lib`
    4.entry：入口文件路径，默认为 `src/App.vue`，这里改为 `packages/index.js`

- 执行 `npm run build-lib`命令，编译组件
> 构建一个库会输出：

    1.bitsino-ui.common.js //一个给打包器用的 CommonJS 包 (不幸的是，webpack 目前还并没有支持 ES modules 输出格式的包)    
    2.bitsino-ui.umd.js //一个直接给浏览器或 AMD loader 使用的 UMD 包    
    3.dist/myLib.css //若vue.config.js中 设置css.extract = false 则为强制内联。否则样式会被单独打包，在引用时需引入打包后的样式文件
    
    
生成的lib文件夹为组件库包 可发布到npm

- 执行 `npm run build`或`yarn run build`命令，编译组件库文档项目

# 五、发布到npm

- 配置镜像

`npm config set registry http://registry.npmjs.org`
- 登录npm

`npm login`
    
    Username:z_praise
    password:公司域名
    Email:z_praise的企业邮箱    
- 执行发布命令

`npm publish`

在发布之前要更新`package.json`里的`version`版本号

---
_Source: https://npm.io/package/bitsino-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
