# yyl-seed-webpack

> yyl seed webpack

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

## Install

```sh
npm install yyl-seed-webpack
pnpm add yyl-seed-webpack
yarn add yyl-seed-webpack
bun add yyl-seed-webpack
```

Provides the command `yylw`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.12 |
| Published | 2021-09-02 |
| First published | 2019-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 61.8 KB |
| Known vulnerabilities | 0 (+8 in 2 direct dependencies) |
| Install scripts | no |
| Author | jackness1208 |
| Maintainers | jackness |

## Links

- npm: https://www.npmjs.com/package/yyl-seed-webpack
- Repository: https://github.com/jackness1208/yyl-seed-webpack
- Homepage: https://github.com/jackness1208/yyl-seed-webpack#readme
- Issues: https://github.com/jackness1208/yyl-seed-webpack/issues
- npm.io page: https://npm.io/package/yyl-seed-webpack

## Dependencies (17)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [yyl-os](https://npm.io/package/yyl-os.md) ^0.14.3
- [webpack](https://npm.io/package/webpack.md) 5.40.0
- [yyl-util](https://npm.io/package/yyl-util.md) ^2.3.9
- [yyl-hander](https://npm.io/package/yyl-hander.md) ^1.3.22
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^4.7.2
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^5.8.0
- [yyl-seed-base](https://npm.io/package/yyl-seed-base.md) ^0.4.1
- [@types/webpack](https://npm.io/package/@types/webpack.md) ^5.28.0
- [yyl-cmd-logger](https://npm.io/package/yyl-cmd-logger.md) ^0.2.1
- [querystring-es3](https://npm.io/package/querystring-es3.md) ^0.2.1
- [yyl-config-types](https://npm.io/package/yyl-config-types.md) ^0.5.3
- [yyl-seed-response](https://npm.io/package/yyl-seed-response.md) 0.2.0
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) ^3.11.2
- [yyl-base-webpack-config](https://npm.io/package/yyl-base-webpack-config.md) 0.3.6
- [yyl-vue2-webpack-config](https://npm.io/package/yyl-vue2-webpack-config.md) ^0.3.5
- [@types/webpack-dev-server](https://npm.io/package/@types/webpack-dev-server.md) ^3.11.4

## Recent versions

- 3.1.12 (latest) — 2021-09-02
- 3.1.11 — 2021-08-10
- 3.1.10 — 2021-08-10
- 3.1.9 — 2021-08-10
- 3.1.8 — 2021-08-10
- 3.1.7 — 2021-08-10
- 3.1.6 — 2021-08-09
- 3.1.5 — 2021-08-09
- 3.1.4 — 2021-07-27
- 3.1.3 — 2021-07-14
- 3.1.2 — 2021-07-13
- 3.1.1 — 2021-07-10
- 3.1.0 — 2021-07-09
- 3.0.27 — 2021-06-28
- 3.0.26 — 2021-06-26
- … 143 more at https://npm.io/package/yyl-seed-webpack/versions

## README

# yyl-seed-webpack

yyl 构建种子 - `webpack`

## SDK

### seed.name

```
/**
 * @return {String} seed 包名称
 */
seed.name
```

### seed.version

```
/**
 * @return {String} seed 包版本
 */
seed.version
```

### seed.path

```
/**
 * @return {String} seed 所在目录
 */
seed.path
```

### seed.optimize()

```
/**
 * @param  {Object} config       配置文件
 * @param  {Object} config.dest.basePath          path name
 * @param  {Object} config.alias                  作用域
 * @param  {String} config.alias.commons          公用组件地址
 * @param  {String} config.alias.globalcomponents 公用 components 目录
 * @param  {String} config.alias.globallib        公用 components 目录
 * @param  {String} config.alias.root             输出目录中 到 html, js, css, image 层 的路径
 * @param  {String} config.alias.revRoot          rev 输出内容的相对地址
 * @param  {String} config.alias.destRoot         dest 地址
 * @param  {String} config.alias.srcRoot          src 地址
 * @param  {String} config.alias.dirname          项目根目录
 * @param  {String} config.alias.jsDest           js 输出地址
 * @param  {String} config.alias.jslibDest        js lib 输出地址
 * @param  {String} config.alias.htmlDest         html 输出地址
 * @param  {String} config.alias.cssDest          css 输出地址
 * @param  {String} config.alias.imagesDest       images 输出地址
 * @param  {String} config.alias.revDest          assets 输出地址
 * @param  {String} config.alias.tplDest          tpl 输出地址
 * @param  {String} config.resolveModule          webpack 读取 node_modules 位置
 * @param  {String} projectPath                   构建项目所在目录
 * @return {Object} opzer                         压缩实例
 */
seed.optimize(config, projectPath)
```

### opzer

```
/**
 * @param  {Object}  op 参数
 * @param  {Boolean} op.isCommit 执行压缩
 * @param  {Boolean} op.remote   映射远程
 * @return {Object}  ctrler      操作句柄
 */
opzer.watch(op)
opzer.watchAll(op)
opzer.all(op)
opzer.js(op)
opzer.css(op)
opzer.html(op)
opzer.tpl(op)
opzer.images(op)
```

### ctrler.on()

```
/**
 * @param {String} eventName 需要监听的事件，目前有
 *                           - onOptimize 对应 fn(file)
 *                           - finished   对应 fn(taskName)
 *                           - msg        对应 fn(type, argv)
 *                           - clear      对应 fn()
 *                           - start      对应 fn(taskName)
 */
opzer.on(eventName, fn)
```

### ctrler.off()

```
/**
 * @param  {String} eventName 要解除绑定的 eventName,
 *                            不填则全部都解绑
 * @return {Void}
 */
opzer.off(eventName)
```

### ctrler.trigger()

```
/**
 * @param {String} eventName 需要触发的事件
 * @param {Array}  argv      参数
 */
opzer.trigger(eventName, argv)
```

### seed.initServerMiddleWare(app)

```
/**
 * 配置server 中间件
 * @param {Object} app 服务器对象
 */
seed.initServerMiddleWare(app)
```

### seed.ignoreLiveReload

```
/**
 * 不需要系统hot reload
 * @return {Boolean} false
 */
seed.ignoreLiveReload
```

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