Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
kissy modularization part2
Search
yiminghe
February 21, 2014
Technology
1.8k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
kissy modularization part2
part2 of kissy modularization tutorials
yiminghe
February 21, 2014
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
300
支付宝小程序的开放架构
yiminghe
0
230
gitc2016 react based architecture
yiminghe
1
190
antd at qcon2016
yiminghe
1
250
react-based architecture
yiminghe
2
190
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
350
react best practice
yiminghe
3
230
react at alipay
yiminghe
43
4.6k
Other Decks in Technology
See All in Technology
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
250
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
250
【AG-UI × A2UI × MCP Apps】Generative UIをやさしく解説する
nrinetcom
PRO
1
120
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.6k
事業価値と Engineering 2026年度版
recruitengineers
PRO
49
24k
AWS ネットワーク構築でハマった(ハマりかけた) 5選とそこから得た教訓
nagisa53
4
220
猫付きpingコマンドを自作
uyuki234
0
240
ブラウザ研修 2026
recruitengineers
PRO
6
1k
Sets in Go
ramalho
1
720
モバイルアプリ開発概論2026
recruitengineers
PRO
5
600
モダンフロントエンド 開発研修
recruitengineers
PRO
4
650
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
13
13k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
25k
Building the Perfect Custom Keyboard
takai
2
840
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
790
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Designing Experiences People Love
moore
143
24k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
Building Applications with DynamoDB
mza
96
7.2k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Transcript
KISSY Modularization part 2 - optimzation
[email protected]
之前浏览器下的问题 • 首屏闪烁 • 链接数过多
链接数
使用工具进行优化 • grunt-kmc • 合并文件 • 动态 combo
• 合并项目文件
合并文件 • 适合具备明确的入口文件 • Gruntfile.js
modules.js • 描述项目合并后文件外部依赖
index.js • 入口模块以及其依赖的本地模块
应用 • 引入 seed.js modules.js • 配置 combine true •
http://localhost:8111/?concat=1
• 动态 combo
动态 combo • 适合多入口或无入口应用或需要后期动态加载 • Gruntfile.js
Module.js • 包含项目所有的模块的内部依赖与外部依赖
应用 • 引入 seed.js modules.js • 配置 combine true •
http://localhost:8111/?combo=1
• 首屏闪烁
加载 css • 异步加载 css 造成闪烁
加载 css • 使用 importStyle 配置 modules.js 同步 combo 加载
css • 对首屏用到的所有模块调用 importStyle
大规模应用优化 • Gallery/mini 模块? • 打包进项目入口文件 • 动态 combo •
合并 gallery/mini 模块的 modules.js 到项目 modules.js