wuhy

Results 2 issues of wuhy

Execute the following code and see the result: ``` var ast = esprima.parse(code, {attachComment: true}); var result = escodegen.generate(ast, {comment: true}); ``` To parse code: ``` (function (root, factory) {...

使用版本化目的: 1. 避免浏览器端缓存需要重新请求的静态资源; 2. 更好版本号机制,可以确保每次上线,浏览器端不会重复请求没有变化的静态资源。 目前edp提供了如下几种添加版本号方式: - PathMapper处理器 通过配置 ``` javascript // SvnRevision函数请自己实现 { "to": "asset-" + SvnRevision() } ``` 优点:使用简单,能够多版本并存 缺点:浏览器无法充分利用缓存的机制,由于这种方式默认所有静态资源都发生变化, 其次服务端静态资源随着上线次数增多,静态资源文件夹数量也会越来越多 -