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
Bower + WebComponents
Search
mex-ichikawa
October 24, 2014
Programming
43
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Bower + WebComponents
WebComponentsのパッケージ化について。。。
mex-ichikawa
October 24, 2014
More Decks by mex-ichikawa
See All by mex-ichikawa
Three.js vs Unity5
mex_ichikawa
0
65
WebAudioAPIで(目的の)SE作れなかった話
mex_ichikawa
0
42
gulp + React
mex_ichikawa
2
440
Blob URL Scheme
mex_ichikawa
0
590
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
770
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
270
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
370
スマート反転とウェブアクセシビリティ
camiha
0
210
setup-vp GitLab対応の裏側
naokihaba
0
120
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
160
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
220
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
570
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
アクセシビリティから考える情報設計
high_g_engineer
0
390
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Test your architecture with Archunit
thirion
2
2.4k
ラッコキーワード サービス紹介資料
rakko
1
5M
How STYLIGHT went responsive
nonsquared
100
6.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.9k
GitHub's CSS Performance
jonrohan
1033
470k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
540
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Transcript
Bower + WebComponents @ichikawa Tsukiji.front - 2014/10/24
パッケージ管理ツール
• Component - https://github.com/componentjs/component • Bower - http://bower.io/ • RequireJS
- http://requirejs.org/ • Browserify - http://browserify.org/
• Component - https://github.com/componentjs/component • Bower - http://bower.io/ • RequireJS
- http://requirejs.org/ • Browserify - http://browserify.org/
普段使ってるBowerで!
とりあえずColorPickerを作る
ソースをコンポーネント化
ソースをコンポーネント化
まずは、 シンプルなテンプレコード で実行
createdCallback: { value: function(){ var shadowRoot = this.createShadowRoot(); var template
= document.querySelector('#nameOfTemplate'); shadowRoot.appendChild(template.content.cloneNode(true)); } }
templateが読めない。。。
//global var currentDocument = document.currentScript.ownerDocument; ... createdCallback: { value: function(){
var shadowRoot = this.createShadowRoot(); var template = currentDocument.querySelector('#nameOfTemplate'); shadowRoot.appendChild(template.content.cloneNode(true)); } }
読めるようになった!
作成コードをはめ込む
• テンプレートがShadowRoot内に入るのでセレクタ注意 • 画像などのアセットパスの扱いをどうするか、今回は埋め込んだ
githubにpush
bowerに登録 bower register [パッケージ名] [パッケージリポジトリパス ]
別プロジェクトで利用 DEMO
ホントは配置までやりたかった 次の機会に。。。
おわり