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
1.7k
kissy modularization part2
part2 of kissy modularization tutorials
yiminghe
February 21, 2014
Tweet
Share
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
200
支付宝小程序的开放架构
yiminghe
0
180
gitc2016 react based architecture
yiminghe
1
140
antd at qcon2016
yiminghe
1
200
react-based architecture
yiminghe
2
150
React Ecosystem At Ant Financial
yiminghe
4
2.2k
ant design preview
yiminghe
1
270
react best practice
yiminghe
3
190
react at alipay
yiminghe
43
4.3k
Other Decks in Technology
See All in Technology
AWS と定理証明 〜ポリシー言語 Cedar 開発の舞台裏〜 #fp_matsuri / FP Matsuri 2025
ytaka23
8
1.8k
型システムを知りたい人のための型検査器作成入門
mame
13
3.2k
Drawing with LLMs
rist
0
230
libsyncrpcってなに?
uhyo
0
260
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
17k
ソフトウェアテストのAI活用_ver1.20
fumisuke
0
240
今からでも間に合う! 生成AI「RAG」再入門 / Re-introduction to RAG in Generative AI
hideakiaoyagi
0
100
Test Smarter, Not Harder: Achieving Confidence in Complex Distributed Systems
eliasnogueira
1
140
エンジニア採用から始まる技術広報と組織づくり/202506lt
nishiuma
8
1.4k
うちの会社の評判は?SNSの投稿分析にAIを使ってみた
doumae
0
630
AWS Lambdaでサーバレス設計を学ぼう_ベンダーロックインの懸念を超えて-サーバレスの真価を探る
fukuchiiinu
4
960
Amazon DevOps Guru のベースラインを整備して1ヶ月ほど運用してみた #jawsug_asa / Amazon DevOps Guru trial
masahirokawahara
3
230
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
870
Building Applications with DynamoDB
mza
95
6.4k
Unsuck your backbone
ammeep
671
58k
Statistics for Hackers
jakevdp
799
220k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Optimizing for Happiness
mojombo
379
70k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Become a Pro
speakerdeck
PRO
28
5.4k
The Cult of Friendly URLs
andyhume
79
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
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