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
45
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
68
WebAudioAPIで(目的の)SE作れなかった話
mex_ichikawa
0
45
gulp + React
mex_ichikawa
2
450
Blob URL Scheme
mex_ichikawa
0
590
Other Decks in Programming
See All in Programming
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
mrbgem 三角測量 開発
ogom
0
240
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
230
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
360
すこし踏み込む CancellationToken
htkym
2
1.7k
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
150
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
170
golang-bob.pdf
iwatsukayura
0
130
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
2
1.9k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Featured
See All Featured
A Soul's Torment
seathinner
8
3.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
エンジニアに許された特別な時間の終わり
watany
109
250k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
How to Ace a Technical Interview
jacobian
280
24k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Side Projects
sachag
456
43k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
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
ホントは配置までやりたかった 次の機会に。。。
おわり