Top Banner
The Front-end Stacks of our April fool SPA April 21st, 2016 Tech Talk Tokyo #1
15

Front-end Stacks of our April fool SPA

Jan 09, 2017

Download

Technology

chuck hayes
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Front-end Stacks of our April fool SPA

The Front-end Stacksof our April fool SPA

April 21st, 2016Tech Talk Tokyo #1

Page 2: Front-end Stacks of our April fool SPA

Who I am• Takashi Yoneyama (English name : chuck)

• Livesense, inc.(Tokyo, Japan)

• EastMeetEast, inc.(NewYork, USA)

• Junior Front-end Developer with 1.5 years exp.

• HTML, CSS, JS, Ruby, PHP, Swift, Elm.

Page 3: Front-end Stacks of our April fool SPA

What we made

A Single page application to list all April fool websites.

Page 4: Front-end Stacks of our April fool SPA

“Fastest Summery of April fools in Japan.”http://april2016.jobtalk.jp/

Page 5: Front-end Stacks of our April fool SPA

Back-end stacks• Codes are in Github. (Cool)

• on AWS with CircleCI. (Okay..cool)

• Possible to deploy via Slack. (Completely no idea…)

Page 6: Front-end Stacks of our April fool SPA

I can talk about my friends😊

Page 7: Front-end Stacks of our April fool SPA

Front-end stacks• View layer is React.js

• Style by Sass.

• Bundle with Webpack.

• Data is contained in JSON.

Page 8: Front-end Stacks of our April fool SPA

Main trick is..This time we tried to

let Webpack handle everything,

React, Sass, image, json, html.

Page 9: Front-end Stacks of our April fool SPA

We needed several “loaders” which Webpack uses to load multiple types of assets.

• babel-loader for ES2015 and React.

• sass-loader, css-loader and style-loader for Sass.

• json-loader for json.

• https://webpack.github.io/docs/loaders.html

Page 10: Front-end Stacks of our April fool SPA

For example we can use Sass in JS !! Like below…

Because Webpack can understand and look for sass file through sass-loader.

Page 11: Front-end Stacks of our April fool SPA

./style.scss (required into index.js)

./bundle.js (output file of bundling index.js)

Page 12: Front-end Stacks of our April fool SPA

Any assets in JavaScript.• We don’t need Gulp or Grunt.

• We never see ‘css’ file.

• Just run Webpack.

Page 13: Front-end Stacks of our April fool SPA

So we…

• Highly recommend to use Webpack for building SPA in the point of quickness and easiness.

• But also be careful to adopt ‘Any files in JS’ in your massive application.

Page 14: Front-end Stacks of our April fool SPA

Further information• Webpack — The Confusing Parts

• CSS Modules — Solving the challenges of CSS at scale

• Why I Left Gulp and Grunt for npm Scripts

• 【意訳】Webpackの混乱ポイント

• [意訳]CSSモジュール、あるいは大規模サイトにおけるCSSの課題解決

• [意訳]私がGulpとGruntを手放した理由

Page 15: Front-end Stacks of our April fool SPA

SNS & Contacts• Twitter @chuck0523

• Github chuck0523

• Gmail [email protected]

• Only you can free yourself (personal)

• MyTechBlog(programming)

More About Me

MyBlogs