# wbg-dongrn-pub-demo

> "发布vue插件"

Latest version **1.0.1** (published 2019-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install wbg-dongrn-pub-demo
pnpm add wbg-dongrn-pub-demo
yarn add wbg-dongrn-pub-demo
bun add wbg-dongrn-pub-demo
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-10-25 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dongruinan |
| Maintainers | wbg-dongrn |

## Links

- npm: https://www.npmjs.com/package/wbg-dongrn-pub-demo
- Repository: https://github.com/dongruinan/vue-plugin-drn
- Homepage: https://github.com/dongruinan/vue-plugin-drn#readme
- Issues: https://github.com/dongruinan/vue-plugin-drn/issues
- npm.io page: https://npm.io/package/wbg-dongrn-pub-demo

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.11

## Recent versions

- 1.0.1 (latest) — 2019-10-25
- 1.0.0 — 2019-10-24

## README

# pub-demo

> \"发布vue插件\"

## Build Setup

# 准备工作

>默认你已经配置好了node，npm，webpack环境并且可以顺利使用vue-cli创建项目


## 创建项目

```
vue init webpack-simple yourProName
cd yourProName

npm i 
npm run dev

```


## npm 注册
```
npm adduser 
Username: your name
Password: your password
Email: your email
```
## npm 使用
```
npm whoami  //npm登录账号
npm login //登录
npm publish //发布

```

## npm 发布遇到的问题
+ 注册后需要邮件激活
+ 包名字 不能太简单 不能与现有的重复或近试


## 包发布前的修改
+ packpage.json
```
{
  "private": false,//这里一定要改为 false
  "version":"1.0.0"
  "main": "dist/wbg-vue-toast.js",//默认 import 引入插件时，读取的文件
  "repository": {
    "type": "git",
    "url": ""//这里存放github的地址
  }
}
```


+ webpack.config.js

```
 entry: './src/lib/index.js',
  output: {
    path: path.resolve(__dirname, './dist'),
    publicPath: '/dist/',
    filename: 'toastPanel.js',
    library: 'toastPanel', // library指定的就是你使用require时的模块名，这里便是require("toastPanel")
    libraryTarget: 'umd', //libraryTarget会生成不同umd的代码,可以只是commonjs标准的，也可以是指amd标准的，也可以只是通过script标签引入的。
    umdNamedDefine: true // 会对 UMD 的构建过程中的 AMD 模块进行命名。否则就使用匿名的 define。
  },
```
# build for production with minification
npm run build
```

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