Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
320
支付宝小程序的开放架构
yiminghe
0
250
gitc2016 react based architecture
yiminghe
1
190
antd at qcon2016
yiminghe
1
260
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
240
react at alipay
yiminghe
43
4.6k
Other Decks in Technology
See All in Technology
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
240
SREへの勘違いに気づいた後の話
tomodakengo
0
150
ほんとうの信頼性はヒーローが死んでからはじまる / True reliability begins after the hero dies
vtryo
0
120
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
20k
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
140
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2.4k
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.2k
SREは、MCPとAutopilotをこう使え!
kazumax55
3
950
AIエージェントの一手は 誰も見ていない - Falco拡張OSS「Prempti」とeBPFで サーバーレス実行基盤を二層防御する
keitah
0
520
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.6k
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
290
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.6k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
The Curse of the Amulet
leimatthew05
3
15k
Building Applications with DynamoDB
mza
96
7.2k
Visualization
eitanlees
152
17k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Why Our Code Smells
bkeepers
PRO
340
58k
Thoughts on Productivity
jonyablonski
76
5.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
530
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