# yyl-seed-gulp-requirejs

> yyl 构建种子 - `gulp-requirejs`

Latest version **5.0.11** (published 2021-06-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install yyl-seed-gulp-requirejs
pnpm add yyl-seed-gulp-requirejs
yarn add yyl-seed-gulp-requirejs
bun add yyl-seed-gulp-requirejs
```

Provides the command `yylr`.

## 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 | 5.0.11 |
| Published | 2021-06-28 |
| First published | 2018-08-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.3.0 |
| Dependencies | 32 |
| Unpacked size | 94.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | jackness |
| Maintainers | jackness |

## Links

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

## Dependencies (32)

- [gulp](https://npm.io/package/gulp.md) ^4.0.2
- [sass](https://npm.io/package/sass.md) 1.26.3
- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [yyl-fs](https://npm.io/package/yyl-fs.md) ^0.3.3
- [gulp-pug](https://npm.io/package/gulp-pug.md) 4.0.1
- [imagemin](https://npm.io/package/imagemin.md) 7.0.1
- [rev-hash](https://npm.io/package/rev-hash.md) 3.0.0
- [through2](https://npm.io/package/through2.md) 2.0.3
- [yyl-util](https://npm.io/package/yyl-util.md) 2.3.9
- [gulp-sass](https://npm.io/package/gulp-sass.md) ^4.1.0
- [requirejs](https://npm.io/package/requirejs.md) 2.3.6
- [node-watch](https://npm.io/package/node-watch.md) ^0.6.3
- [yyl-hander](https://npm.io/package/yyl-hander.md) ^1.3.22
- [gulp-filter](https://npm.io/package/gulp-filter.md) 5.1.0
- [gulp-rename](https://npm.io/package/gulp-rename.md) 1.4.0
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) 1.5.3
- [yyl-request](https://npm.io/package/yyl-request.md) 0.1.1
- [gulp-plumber](https://npm.io/package/gulp-plumber.md) 1.2.0
- [gulp-prettify](https://npm.io/package/gulp-prettify.md) 0.5.0
- [imagemin-svgo](https://npm.io/package/imagemin-svgo.md) 7.0.0
- [yyl-seed-base](https://npm.io/package/yyl-seed-base.md) ^0.4.1
- [gulp-clean-css](https://npm.io/package/gulp-clean-css.md) 4.2.0
- [yyl-cmd-logger](https://npm.io/package/yyl-cmd-logger.md) ^0.2.1
- [imagemin-optipng](https://npm.io/package/imagemin-optipng.md) 7.1.0
- [yyl-config-types](https://npm.io/package/yyl-config-types.md) ^0.5.4
- [yyl-inlinesource](https://npm.io/package/yyl-inlinesource.md) ^1.2.1
- [gulp-replace-path](https://npm.io/package/gulp-replace-path.md) 0.4.0
- [imagemin-gifsicle](https://npm.io/package/imagemin-gifsicle.md) 7.0.0
- [imagemin-jpegtran](https://npm.io/package/imagemin-jpegtran.md) 7.0.0
- [yyl-file-replacer](https://npm.io/package/yyl-file-replacer.md) ^0.6.4
- [yyl-seed-response](https://npm.io/package/yyl-seed-response.md) 0.2.0
- [concat-with-sourcemaps](https://npm.io/package/concat-with-sourcemaps.md) ^1.1.0

## Recent versions

- 5.0.11 (latest) — 2021-06-28
- 5.0.10 — 2021-05-27
- 5.0.9 — 2021-05-27
- 5.0.8 — 2021-05-23
- 5.0.7 — 2021-05-23
- 5.0.6 — 2021-05-23
- 5.0.5 — 2021-05-23
- 5.0.4 — 2021-05-23
- 5.0.3 — 2021-05-22
- 5.0.2 — 2021-05-22
- 5.0.1 — 2021-05-16
- 5.0.0 — 2021-05-11
- 4.7.4 — 2020-10-09
- 4.7.3 — 2020-09-26
- 4.7.2 — 2020-09-26
- … 50 more at https://npm.io/package/yyl-seed-gulp-requirejs/versions

## README

# yyl-seed-gulp-requirejs
yyl 构建种子 - `gulp-requirejs`

## SDK

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

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

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

### seed.example
```
/**
 * @return {Array} seed example list
 */
seed.path
```

### seed.optimize()
```
/**
 * @param  {Object} config       配置文件
 * @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} projectPath                   构建项目所在目录
 * @return Promise<opzer> opzer                         压缩实例
 */
seed.optimize({ config, root })
```

### 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)
```

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