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
PhoneGap/CordovaとWebpackで作るハイブリッドアプリ開発環境
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
puku0x
March 15, 2017
Programming
800
0
Share
PhoneGap/CordovaとWebpackで作るハイブリッドアプリ開発環境
puku0x
March 15, 2017
More Decks by puku0x
See All by puku0x
Agent Skills 入門
puku0x
0
1.6k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
1.9k
生成AIではじめるテスト駆動開発
puku0x
0
1.1k
実践!カスタムインストラクション&スラッシュコマンド
puku0x
2
3k
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
1.5k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
290
ファインディでのGitHub Actions活用事例
puku0x
9
3.8k
Findyの開発生産性向上への取り組み ~Findyフロントエンドの場合~
puku0x
0
470
Findyの開発生産性を上げるためにやったこと
puku0x
1
650
Other Decks in Programming
See All in Programming
AIと共にエンジニアとPMの “二刀流”を実現する
naruogram
0
120
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
130
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
120
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
320
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
510
Rethinking API Platform Filters
vinceamstoutz
0
5.6k
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
820
おれのAgentic Coding 2026/03
tsukasagr
1
130
KagglerがMixSeekを触ってみた
morim
0
360
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
160
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
440
Building Applications with DynamoDB
mza
96
7k
GraphQLとの向き合い方2022年版
quramy
50
14k
Code Review Best Practice
trishagee
74
20k
Prompt Engineering for Job Search
mfonobong
0
250
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
170
Being A Developer After 40
akosma
91
590k
Ruling the World: When Life Gets Gamed
codingconduct
0
190
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Skip the Path - Find Your Career Trail
mkilby
1
93
What's in a price? How to price your products and services
michaelherold
247
13k
Transcript
PhoneGap/Cordova ͱ Webpack Ͱ࡞Δ ϋΠϒϦουΞϓϦ։ൃڥ ԶͷΛฉ͚ʂʂLTେձ #1 2017/03/15
ࣗݾհ • ৽ ٓါ ʢShinpuku Noriyukiʣ • גࣜձࣾϕʔλιϑτ ΤϯδχΞ •
झຯɾಛٕɿϓϩάϥϛϯά https://github.com/puku0x
։ൃதͷϓϩμΫτ
എܠ • PhoneGapͰΞϓϦ࡞͖ͬͯͨ • ͦΖͦΖ৽͍ٕ͠ज़Λಋೖ͍ͨ͠ • ES2015, TypeScript, PostCSS, …
ࣗͰ࡞Ζ͏ τϥϯεύΠϥ #BCFMͱ͔1PTU$44 1IPOF(BQ ES5/CSS3 ʹม ES2015, SassͳͲ
Α͠ʂnpmͱGulpͱ…
πʔϧଟ͗͢ʂ
Webpack
Webpack 2.x • ґଘؔղܾͱมˍ݁߹
ߏ • npm + Webpack + PhoneGap /src /www ES5/CSS3
ʹม
Webpackઃఆ
ೖग़ྗઃఆ const webpack = require('webpack'); module.exports = (env) => {
return { entry: { app: __dirname + '/src/js/app.js' }, output: { path: __dirname + '/www/assets', filename: '[name].bundle.js', }, }}; TSD͔Β XXXBTTFUT
ϩʔμઃఆʢES2015ʣ const webpack = require('webpack'); module.exports = (env) => {
return { : module: { rules: [{ test: /\.js$/, exclude: /(node_modules|bower_components)/, use: ['babel-loader'] }] } }; }; YܥzVTFz MPBEFSলུෆՄ
Babelઃఆ { "presets": [ [ “es2015", {"modules": false} ] ],
"plugins": [ "angularjs-annotate" ] } YܥͰ"OHVMBS+4 Λ͏ͱ͖༻
࣮ߦεΫϦϓτ "scripts": { "build": "webpack" } $ npm run build
$ phonegap serve
Sass/SCSS͍͍ͨʂ
ϩʔμઃఆʢPostCSSʣ const webpack = require('webpack'); module.exports = (env) => {
return { : module: { rules: [{ test: /\.(css|scss)$/, use: ['style-loader', 'css-loader', 'postcss-loader'] }] } }; };
PostCSSઃఆ module.exports = { plugins: [ require('postcss-import'), require('postcss-url'), require('postcss-cssnext'), require('postcss-nested'),
require('postcss-mixins'), require(‘postcss-simple-vars') ] }
Ϗϧυ $ npm run build $ phonegap serve …͍ɺͪΐͬͱͯʂ
ϑΝΠϧࢹ "scripts": { "webpack": "webpack —-watch", "serve": "phonegap serve", "start":
"npm run webpack & npm run serve" } $ npm start WindowsڥͰconcurrently͕ඞཁ͔
ʂ /src /www Ϗϧυ มߋݕ มߋݕ σϓϩΠ ES2015, Sass ES5,
CSS3 https://github.com/puku0x/angularjs-onsenui2-webpack2
·ͱΊ • WebpackΛ͓͏ • ͬͱ͍͍ํ๏͕͋Εੋඇʂ