⒏ JS 合并压缩

littledu edited this page Mar 7, 2016 · 3 revisions

tmt-workflow 使用 gulp-usemin2 作为 JS 文件合并压缩工具,以减少请求。

只需要按如下代码结构编写即可:

<!-- build:js ../js/build.js -->
<script src="../js/lib.js"></script>
<script src="../js/workflow.js"></script>
<!-- endbuild -->

在 src 目录下,如果想哪些 js 在 build_dist 时合并压缩,只需要用两条注释包起来,并且写上合并压缩后生成的路径和名字即可。

OVER!!!

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.