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
290
支付宝小程序的开放架构
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
Goでデータパイプラインを作ろう
sansantech
PRO
1
420
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
190
カートの信頼性を担保するWireMockを使ったe2eテスト
ykagano
0
190
トヨタ⽣産⽅式(TPS)⼊⾨
recruitengineers
PRO
3
720
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
220
モダンフロントエンド 開発研修
recruitengineers
PRO
4
610
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
290
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
220
ラジオの科学
frievea
0
300
SmartHR Engineering Team Deck
smarthr
1
1.9k
[ChatGPT Work LT]事務作業が苦手な人のための バックオフィスの「半」自動化
chimaki_iot
0
280
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
850
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
690
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
590
The SEO identity crisis: Don't let AI make you average
varn
0
530
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
700
Git: the NoSQL Database
bkeepers
PRO
432
67k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
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