# webpack-library-example

> webpack library example 使用webpack打包自己写的一个JavaScript类库，并上传至NPM

Latest version **0.1.5** (published 2018-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-library-example
pnpm add webpack-library-example
yarn add webpack-library-example
bun add webpack-library-example
```

## 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.1.5 |
| Published | 2018-10-14 |
| First published | 2018-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | weiqinl |
| Maintainers | weiqin |
| Keywords | webpack, number, word |

## Links

- npm: https://www.npmjs.com/package/webpack-library-example
- Repository: https://github.com/weiqinl/webpack-library-example
- Homepage: https://github.com/weiqinl/webpack-library-example#readme
- Issues: https://github.com/weiqinl/webpack-library-example/issues
- npm.io page: https://npm.io/package/webpack-library-example

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2018-10-14
- 0.1.4 — 2018-10-14
- 0.1.3 — 2018-10-14
- 0.1.2 — 2018-10-14
- 0.1.1 — 2018-10-14
- 0.1.0 — 2018-10-14

## README

# webpack-library-example
webpack library example 使用webpack打包自己写的一个JavaScript类库并上传至NPM

可以结合[此文章](https://www.cnblogs.com/weiqinl/p/9786966.html)阅读: https://www.cnblogs.com/weiqinl/p/9786966.html


## 简介

此 library 主要有两个方法（只针对 0-10 之间的数，word 不区分大小写）：  
numToWord(num)  
wordToNum(word)

twoFunction： numToWord && wordToNum。  
两个方法：数字转英文单词，英文单词转数字。只针对 0-10

## 发布到 npm

```
npm login
npm publish

npm version <update_type>
npm run build // 先webpack打包类库，之后再发布
npm publish
```

其中`npm version <update_type>`的选项有如下：
`npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]`

## 使用方式

### 浏览器

1. 加载 Using Script Tag

```
<script src="//unpkg.com/lodash"></script>
<script src="//unpkg.com/webpack-library-example"></script>
```

2. 使用 Usage In Web

```
numberWord.VERSION
numberWord.numToWord(6)
numberWord.wordToNum('five')
```

### NODE

1. 安装 Using npm:

```
npm install webpack-library-example --save-dev
```

2. 使用 Usage In Node.js

```
require('lodash')
var webpackNumber =  require('webpack-library-example')

webpackNumber.numToWord(1)
webpackNumber.wordToNum('two')
```

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