Introduction of medpacker: RoR Frontend Boilerplate
by
pipopotamasu
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Introduction Of medpacker RoR Frontend Boilerplate MedPeer, Inc Yamato Murakami (@pipopotamasu3) RailsDM 03/23/2019
Slide 2
Slide 2 text
name: Yamato Murakami, github: pipopotamasu, twitter: pipopotamasu3, company: MedPeer, Inc, tech: [ Ruby, PHP, Vue.js, React ], hobby: Baseball
Slide 3
Slide 3 text
So, what is medpacker?
Slide 4
Slide 4 text
So, what is medpacker? https://github.com/medpeer-inc/medpacker
Slide 5
Slide 5 text
So, what is medpacker? medpacker is … RoR Frontend Boilerplate for MedPeer, Inc
Slide 6
Slide 6 text
So, what is medpacker? 3 concepts 1VSFXFCQBDL /PBTTFUQJQFMJOF /PXFCQBDLFS 1SFJOTUBMMFE MJCSBSJFT 4UBSUEFWFMPQNFOU JNNFEJBUFMZ VOJGZMJCSBSJFT &BTZBOEGBTU JOTUBMM *OTUBMMUJNFJT XJUIJONJOJUFT
Slide 7
Slide 7 text
Why I developed medpacker?
Slide 8
Slide 8 text
3 motivations 1. Difficulties of asset pipeline and webpacker 2. Light unification of adopted libraries 3. Faster services launch
Slide 9
Slide 9 text
Difficulties of asset pipeline and webpacker
Slide 10
Slide 10 text
Cons of asset pipeline • Integration Modern Frontend • Slow sprokets • Rails-way frontend
Slide 11
Slide 11 text
Cons of webpacker • Abstract webpack config • Strange initial config • Depend on webpack v3
Slide 12
Slide 12 text
Confs of webpacker • Abstract webpack config • Strange initial config • Depend on webpack v3
Slide 13
Slide 13 text
webpacker • Abstract webpack config • Strange initial config • Depend on webpack v3
Slide 14
Slide 14 text
We need pure webpack for modern frontend.
Slide 15
Slide 15 text
Light unification of adopted libraries
Slide 16
Slide 16 text
Imazine!
Slide 17
Slide 17 text
Backend engineers
Slide 18
Slide 18 text
Frontend engineer from associate company
Slide 19
Slide 19 text
Let’s start project!
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
webpacker
Slide 22
Slide 22 text
webpacker We focus on Vue.js!
Slide 23
Slide 23 text
webpacker We focus on Vue.js!
Slide 24
Slide 24 text
webpacker I had should share our tech context but I had could’t …
Slide 25
Slide 25 text
We need light unification for libraries.
Slide 26
Slide 26 text
Faster services launch
Slide 27
Slide 27 text
MedPeer mid-term strategy
Slide 28
Slide 28 text
MedPeer mid-term strategy
Slide 29
Slide 29 text
Many new services will launch…
Slide 30
Slide 30 text
No content
Slide 31
Slide 31 text
No content
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
ۭͷpackge.json
Slide 35
Slide 35 text
It takes long time from scratch.
Slide 36
Slide 36 text
We need frontend boilerplate to launch services faster.
Slide 37
Slide 37 text
3 motivations 1. Difficulties of asset pipeline and webpacker 2. Light unification of adopted libraries 3. Faster services launch
Slide 38
Slide 38 text
So, what is medpacker? 3 concepts 1VSFXFCQBDL /PBTTFUQJQFMJOF /PXFCQBDLFS 1SFJOTUBMMFE MJCSBSJFT 4UBSUEFWFMPQNFOU JNNFEJBUFMZ VOJGZMJCSBSJFT &BTZBOEGBTU JOTUBMM *OTUBMMUJNFJT XJUIJONJOJUFT
Slide 39
Slide 39 text
So, what is medpacker?
Slide 40
Slide 40 text
Install Demo
Slide 41
Slide 41 text
Contents of medpacker
Slide 42
Slide 42 text
webpack ecosystem • webpack • webpack-dev-server • loaders
Slide 43
Slide 43 text
Babel ecosystem • @babel/core • @babel/polyfill • @babel/preset-env
Slide 44
Slide 44 text
PostCSS • autoprefixer • postcss-flexbugs-fixes
Slide 45
Slide 45 text
Lint • eslint • eslint-plugin-vue • stylelint • stylelint-scss
Slide 46
Slide 46 text
Others • Vue.js • rails-ujs • normalize.css • axios
Slide 47
Slide 47 text
Coming soon… • TypeScript • Image compression • etc..
Slide 48
Slide 48 text
You can start development with these libraries.
Slide 49
Slide 49 text
How medpacker works?
Slide 50
Slide 50 text
Install to your app
Slide 51
Slide 51 text
https://guides.rubyonrails.org/rails_application_templates.html
Slide 52
Slide 52 text
https://github.com/medpeer-inc/medpacker/ blob/master/template.rb
Slide 53
Slide 53 text
Read asset files
Slide 54
Slide 54 text
https://github.com/medpeer-inc/medpacker/blob/master/app/helpers/webpack_bundle_helper.rb
Slide 55
Slide 55 text
https://github.com/medpeer-inc/medpacker/blob/master/app/helpers/webpack_bundle_helper.rb
Slide 56
Slide 56 text
https://github.com/medpeer-inc/medpacker/blob/master/app/helpers/webpack_bundle_helper.rb
Slide 57
Slide 57 text
No content
Slide 58
Slide 58 text
https://github.com/medpeer-inc/medpacker/blob/master/app/helpers/webpack_bundle_helper.rb
Slide 59
Slide 59 text
https://github.com/medpeer-inc/medpacker/blob/master/app/helpers/webpack_bundle_helper.rb
Slide 60
Slide 60 text
https://github.com/medpeer-inc/medpacker/blob/master/app/views/layouts/application.html.erb
Slide 61
Slide 61 text
https://github.com/medpeer-inc/medpacker/blob/master/app/views/home/index.html.erb
Slide 62
Slide 62 text
E2E test
Slide 63
Slide 63 text
https://github.com/medpeer-inc/medpacker/blob/master/spec/features/home_spec.rb
Slide 64
Slide 64 text
https://github.com/medpeer-inc/medpacker/blob/master/spec/features/home_spec.rb
Slide 65
Slide 65 text
https://github.com/medpeer-inc/medpacker/blob/master/spec/supports/webpack.rb
Slide 66
Slide 66 text
https://github.com/medpeer-inc/medpacker/blob/master/package.json
Slide 67
Slide 67 text
So, what is medpacker? https://github.com/medpeer-inc/medpacker
Slide 68
Slide 68 text
Special Thanks https://inside.pixiv.blog/subal/4615 https://medium.com/studist-dev/goodbye-webpacker-183155a942f6
Slide 69
Slide 69 text
References • https://inside.pixiv.blog/subal/4615 • https://medium.com/studist-dev/goodbye- webpacker-183155a942f6 • https://github.com/rails/webpacker • https://guides.rubyonrails.org/
Slide 70
Slide 70 text
Reference Images • http://hermie.jp/ • Yoshiki HAYAMA hermie.jp • CC BY 3.0 • https://creativecommons.org/licenses/by/ 3.0/deed.ja
Slide 71
Slide 71 text
Thank you for listening!