2.6.4 • Published 1 month ago

yyl-seed-webpack v2.6.4

Weekly downloads
125
License
ISC
Repository
github
Last release
1 month ago

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
2.6.4

1 month ago

2.6.3

2 months ago

2.6.2

3 months ago

2.6.1

3 months ago

2.6.0

4 months ago

2.5.16

4 months ago

2.5.15

5 months ago

2.5.14

5 months ago

2.5.13

5 months ago

2.5.12

5 months ago

2.5.11

5 months ago

2.5.10

6 months ago

2.5.8

8 months ago

2.5.9

8 months ago

2.5.7

10 months ago

2.5.6

11 months ago

2.5.5

11 months ago

2.5.2

11 months ago

2.5.4

11 months ago

2.5.3

11 months ago

2.5.1

11 months ago

2.5.0

11 months ago

2.4.3

11 months ago

2.4.4

11 months ago

2.4.2

11 months ago

2.4.1

11 months ago

2.4.0

11 months ago

2.3.1

11 months ago

2.3.0

11 months ago

2.2.2

12 months ago

2.2.1

12 months ago

2.2.0

12 months ago

2.1.1

12 months ago

2.1.0

12 months ago

2.0.19

12 months ago

2.0.18

12 months ago

2.0.15

12 months ago

2.0.16

12 months ago

2.0.17

12 months ago

2.0.14

12 months ago

2.0.13

12 months ago

2.0.12

12 months ago

2.0.11

12 months ago

2.0.10

1 year ago

2.0.7

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

2.0.0-beta7

1 year ago

2.0.0-beta6

1 year ago

2.0.0-beta5

1 year ago

2.0.0-beta4

1 year ago

2.0.0-beta3

1 year ago

2.0.0-beta2

1 year ago

2.0.0-beta1

1 year ago

1.0.0

1 year ago

0.3.3

1 year ago

0.3.3-beta3

1 year ago

0.3.3-beta2

1 year ago

0.3.3-beta1

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.1-beta8

1 year ago

0.3.1-beta7

1 year ago

0.3.1-beta6

1 year ago

0.3.1-beta5

1 year ago

0.3.1-beta4

1 year ago

0.3.1-beta3

1 year ago

0.3.1-beta1

1 year ago

0.3.0

1 year ago

0.3.0-beta20

1 year ago

0.4.0-beta2

1 year ago

0.4.0-beta1

1 year ago

0.3.0-beta19

2 years ago

0.3.0-beta18

2 years ago

0.3.0-beta17

2 years ago

0.3.0-beta16

2 years ago

0.3.0-beta15

2 years ago

0.3.0-beta14

2 years ago

0.3.0-beta13

2 years ago

0.3.0-beta12

2 years ago

0.3.0-beta11

2 years ago

0.3.0-beta10

2 years ago

0.3.0-beta9

2 years ago

0.3.0-beta7

2 years ago

0.3.0-beta6

2 years ago

0.3.0-beta5

2 years ago

0.3.0-beta4

2 years ago

0.3.0-beta3

2 years ago

0.3.0-beta2

2 years ago

0.3.0-beta1

2 years ago

0.2.0

2 years ago

0.2.0-beta15

2 years ago

0.2.0-beta14

2 years ago

0.2.0-beta13

2 years ago

0.2.0-beta12

2 years ago

0.2.0-beta11

2 years ago

0.2.0-beta10

2 years ago

0.2.0-beta9

2 years ago

0.2.0-beta8

2 years ago

0.2.0-beta7

2 years ago

0.2.0-beta6

2 years ago

0.2.0-beta5

2 years ago

0.2.0-beta4

2 years ago

0.2.0-beta3

2 years ago

0.2.0-beta2

2 years ago

0.2.0-beta1

2 years ago

0.1.2-beta2

2 years ago

0.1.1-beta1

2 years ago

0.1.0

2 years ago