SlideShare a Scribd company logo
HITCHHIKER'S
GUIDE TO THE FRONT-END
@kjy2143
1
11st. Front End Developer
2 . 1
2 . 2
2 . 3
2 . 4
today
3 . 1
Front End Developer
in 2016
3 . 2
3 . 3
spinner
3 . 4
Front End Developer
in past
4 . 1
4 . 2
Front End Developer
in 2016
5 . 1
http://m.11st.co.kr/
5 . 2
5 . 3
5 . 4
require.js
5 . 5
5 . 6
webpack
5 . 7
webpack
5 . 8
webpack
5 . 9
webpack
5 . 10
scss css
$primary-color: #333;
@mixin border-radius($radius) {
border-radius: $radius;
}
%message {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
@include border-radius(10px);
color: $primary-color;
.box {
display:flex;
}
}
.success {
@extend %message;
border-color: green;
}
.error {
@extend %message;
border-color: red;
}
.warning {
@extend %message;
border-color: yellow;
}
.success, .error, .warning {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
border-radius: 10px;
color: #333;
}
.wrap .box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
.warning {
border-color: yellow;
}
sass
5 . 11
scss css
$primary-color: #333;
@mixin border-radius($radius) {
border-radius: $radius;
}
%message {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
@include border-radius(10px);
color: $primary-color;
.box {
display:flex;
}
}
.success {
@extend %message;
border-color: green;
}
.error {
@extend %message;
border-color: red;
}
.warning {
@extend %message;
border-color: yellow;
}
.success, .error, .warning {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
border-radius: 10px;
color: #333;
}
.wrap .box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
.warning {
border-color: yellow;
}
sass
5 . 12
scss css
$primary-color: #333;
@mixin border-radius($radius) {
border-radius: $radius;
}
%message {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
@include border-radius(10px);
color: $primary-color;
.box {
display:flex;
}
}
.success {
@extend %message;
border-color: green;
}
.error {
@extend %message;
border-color: red;
}
.warning {
@extend %message;
border-color: yellow;
}
.success, .error, .warning {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
border-radius: 10px;
color: #333;
}
.wrap .box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
.warning {
border-color: yellow;
}
sass
5 . 13
scss css
$primary-color: #333;
@mixin border-radius($radius) {
border-radius: $radius;
}
%message {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
@include border-radius(10px);
color: $primary-color;
.box {
display:flex;
}
}
.success {
@extend %message;
border-color: green;
}
.error {
@extend %message;
border-color: red;
}
.warning {
@extend %message;
border-color: yellow;
}
.success, .error, .warning {
border: 1px solid #ccc;
padding: 10px;
}
.wrap {
border-radius: 10px;
color: #333;
}
.wrap .box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
.warning {
border-color: yellow;
}
sass
5 . 14
sass
5 . 15
sass
5 . 16
5 . 17
5 . 18
5 . 19
5 . 20
5 . 21
2016/2017 MUST-KNOW
WEB DEVELOPMENT TECH
CSS Preprocessor Compile
ES2016+ Compile
Optimization
Linting
Unit Testing
Module Bundling
Package Management
5 . 22
Automation
6 . 1
GRUNT
The JavaScript Task Runner
6 . 2
module.exports = function(grunt){
grunt.initConfig({
clean: ['dist/'],
less: {
production: {
files: {
"src/css/combined.css" : "src/less/main.less"
}
}
},
jshint: {
options: {
reporter: require('jshint-stylish'),
jshintrc: true
},
all: ['Gruntfile.js', 'src/js/compiled.js']
}]
});
// Add plugins
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Register tasks
grunt.registerTask('default', ['clean', 'jshint']);
};
Grunt
6 . 3
Grunt
6 . 4
Grunt
6 . 5
Automate and enhance your workflow
6 . 6
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import del from 'del';
import browserSync from 'browser-sync';
import runSequence from 'run-sequence';
gulp.task('font', () => {
return gulp.src(config.src.font)
.pipe(gulp.dest(`${config.dist}/font`));
});
gulp.task('img', () => {
return gulp.src(config.src.img)
.pipe(gulp.dest(`${config.dist}/img`));
});
gulp.task('styles', () => {
gulp.src(`${config.src.styles}/custom.scss`)
.pipe($.sass({
includePaths: ['./node_modules/material-design-lite/src']
}))
.pipe($.minifyCss())
.pipe(gulp.dest(`${config.dist}/css`))
.pipe(browserSync.stream());
});
gulp.task('clean', del.bind(null, [config.dist]));
gulp.task('build', cb => {
runSequence('clean', ['styles','font', 'img'], cb);
});
Gulp
6 . 7
Gulp
6 . 8
Gulp
6 . 9
{
"name": "spinner",
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf dist/tmp",
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"autoprefixer": "postcss -u autoprefixer -r dist/css/*.css",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm-run-all --sequential sass autoprefixer",
"dev:js": "webpack -d --watch --config webpack.dev.config.js",
"build:js": "webpack -p --config webpack.prd.config.js",
"build": "npm run clean && npm-run-all --sequential build:*",
"watch:css": "onchange "src/sass" -- npm run build:css",
"watch:js": "onchange "src/js" -- npm run dev:js",
"watch": "npm-run-all --parallel watch:*",
"serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, doc/**/*.*"",
"start": "npm run build && npm-run-all --parallel serve watch"
},
"homepage": "https://github.com/poohding/spinner#readme"
}
npm scripts(package.json)
6 . 10
npm scripts(package.json)
6 . 11
spinner
https://github.com/poohding/spinner
7 . 1
Development Platform & IDE
Version Control System
&
Package Management
CSS Preprocess
(CSS Concatenating & Minify)
(autoprefixer plugin)
Optimization
goorm.io
Git github
NPM
Sass
PostCSS
CSS Sprites
Image Minify
MVC JavaScript Framework
+ &
UI Library
JavaScript Task Runner
​
Vanilla JS
ES 2016 Webpack Babel.js
Vanilla JS
NPM Scripts
spinner
7 . 2
goorm
https://www.goorm.io/
8 . 1
8 . 2
8 . 3
8 . 4
8 . 5
8 . 6
8 . 7
8 . 8
8 . 9
8 . 10
8 . 11
8 . 12
Node.js & NPM Upgrade
$ npm -v
1.4.28
$ npm install npm@latest -g
$ npm -v
3.10.9
$ node -v
v0.10.38
$ npm install -g n
$ n stable
$ node -v
v0.10.38
8 . 13
8 . 14
git clone & npm install
$ git clone https://github.com/poohding/spinner.git
$ cd spinner
$ npm install
8 . 15
8 . 16
8 . 17
8 . 18
8 . 19
8 . 20
8 . 21
https://{{id}}_prd.goorm.io/practice/spinner/doc/spinner.html
8 . 22
Add HTML
$ git checkout add_html
9 . 1
9 . 2
9 . 3
Add Sass
$ git reset --hard HEAD
$ git checkout add_sass
10 . 1
{
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm run sass",
"build": "npm run clean && npm-run-all --sequential build:*"
}
}
npm run build
package.json
usage
10 . 2
10 . 3
Change Image
$ git reset --hard HEAD
$ git checkout change_image
11 . 1
{
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm run sass",
"build": "npm run clean && npm-run-all --sequential build:*"
}
}
npm run build
package.json
usage
11 . 2
11 . 3
Add Serve
$ git reset --hard HEAD
$ git checkout add_serve
12 . 1
{
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm run sass",
"build": "npm run clean && npm-run-all --sequential build:*",
"watch:css": "onchange "src/sass" -- npm run build:css",
"watch": "npm-run-all --parallel watch:*",
"serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do
"start": "npm run build && npm-run-all --parallel serve watch"
}
}
npm run build
npm start
package.json
usage
12 . 2
Add Style
$ git reset --hard HEAD
$ git checkout add_style
13 . 1
{
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"autoprefixer": "postcss -u autoprefixer -r dist/css/*.css",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm-run-all --sequential sass autoprefixer",
"build": "npm run clean && npm-run-all --sequential build:*",
"watch:css": "onchange "src/sass" -- npm run build:css",
"watch": "npm-run-all --parallel watch:*",
"serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do
"start": "npm run build && npm-run-all --parallel serve watch"
}
}
npm run build
npm start
package.json
usage
13 . 2
13 . 3
Add Webpack
$ git reset --hard HEAD
$ git checkout add_webpack
14 . 1
{
"scripts": {
"clean": "rimraf dist",
"spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d
"sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/",
"autoprefixer": "postcss -u autoprefixer -r dist/css/*.css",
"build:spritesmith": "npm run spritesmith",
"build:css": "npm-run-all --sequential sass autoprefixer",
"dev:js": "webpack -d --watch --config webpack.dev.config.js",
"build:js": "webpack -p --config webpack.prd.config.js",
"build": "npm run clean && npm-run-all --sequential build:*",
"watch:css": "onchange "src/sass" -- npm run build:css",
"watch:js": "onchange "src/js" -- npm run dev:js",
"watch": "npm-run-all --parallel watch:*",
"serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do
"start": "npm run build && npm-run-all --parallel serve watch"
}
}
npm run build
npm start
package.json
usage
14 . 2
webpack.common.config.js
module.exports = {
entry: './src/js/spinner.js',
output: {
path: './dist/js',
filename: 'spinner.bundle.js',
},
module: {
loaders: [{
test: /.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015']
}
}]
},
plugins: []
};
14 . 3
webpack.dev.config.js
var config = require('./webpack.common.config'),
webpack = require('webpack');
config.devtool = 'eval';
module.exports = config;
14 . 4
webpack.prd.config.js
var config = require('./webpack.common.config'),
webpack = require('webpack');
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false,
}
})
);
config.devtool = 'sourcemap';
module.exports = config;
14 . 5
wrap up
15 . 1
Front End Developer
in 2016
15 . 2
15 . 3
2016/2017 MUST-KNOW
WEB DEVELOPMENT TECH
CSS Preprocessor Compile
ES2016+ Compile
Optimization
Linting
Unit Testing
Module Bundling
Package Management
15 . 4
spinner
https://github.com/poohding/spinner
15 . 5
Development Platform & IDE
Version Control System
&
Package Management
CSS Preprocess
(CSS Concatenating & Minify)
(autoprefixer plugin)
Optimization
goorm.io
Git github
NPM
Sass
PostCSS
CSS Sprites
Image Minify
MVC JavaScript Framework
+ &
UI Library
JavaScript Task Runner
​
Vanilla JS
ES 2016 Webpack Babel.js
Vanilla JS
NPM Scripts
spinner
15 . 6
THANK YOU.
15 . 7

More Related Content

What's hot

"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
Fwdays
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具
andyyou
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
Steve Souders
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
stbaechler
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
Fwdays
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
George Estebe
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!
Chang W. Doh
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS偉格 高
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
Hina Chen
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
Jan Voracek
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspmJesse Warden
 
232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현NAVER D2
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
Larry Nung
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment Workflows
AOE
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
Edureka!
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My Site
Steve Souders
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
Philipp Burgmer
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
IT Event
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
Hanoi MagentoMeetup
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to now
Derek Willian Stavis
 

What's hot (20)

"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
 
Vue 淺談前端建置工具
Vue 淺談前端建置工具Vue 淺談前端建置工具
Vue 淺談前端建置工具
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!ServiceWorker: New game changer is coming!
ServiceWorker: New game changer is coming!
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
Nahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressuNahlédněte za oponu VersionPressu
Nahlédněte za oponu VersionPressu
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
 
232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment Workflows
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My Site
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
Packing it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to nowPacking it all: JavaScript module bundling from 2000 to now
Packing it all: JavaScript module bundling from 2000 to now
 

Similar to Hitchhiker's guide to the front end development

Practical guide for front-end development for django devs
Practical guide for front-end development for django devsPractical guide for front-end development for django devs
Practical guide for front-end development for django devs
Davidson Fellipe
 
Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)
Future Insights
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
Pagepro
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
Koji Ishimoto
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
François Michaudon
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack Encore
Engineor
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
Stefan Adolf
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
Stefan Adolf
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Workflow para desenvolvimento Web & Mobile usando grunt.js
Workflow para desenvolvimento Web & Mobile usando grunt.jsWorkflow para desenvolvimento Web & Mobile usando grunt.js
Workflow para desenvolvimento Web & Mobile usando grunt.js
Davidson Fellipe
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
James Rakich
 
"今" 使えるJavaScriptのトレンド
"今" 使えるJavaScriptのトレンド"今" 使えるJavaScriptのトレンド
"今" 使えるJavaScriptのトレンド
Hayato Mizuno
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Fabio Akita
 
2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build
Daniel Fisher
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
Dalibor Gogic
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
Andrii Podanenko
 
Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
Dirk Ginader
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
Asher Martin
 
Javascript is your (Auto)mate
Javascript is your (Auto)mateJavascript is your (Auto)mate
Javascript is your (Auto)mate
Codemotion
 

Similar to Hitchhiker's guide to the front end development (20)

Practical guide for front-end development for django devs
Practical guide for front-end development for django devsPractical guide for front-end development for django devs
Practical guide for front-end development for django devs
 
Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)Get Grulping with JavaScript Task Runners (Matt Gifford)
Get Grulping with JavaScript Task Runners (Matt Gifford)
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack Encore
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Webpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of usWebpack Encore - Asset Management for the rest of us
Webpack Encore - Asset Management for the rest of us
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
Workflow para desenvolvimento Web & Mobile usando grunt.js
Workflow para desenvolvimento Web & Mobile usando grunt.jsWorkflow para desenvolvimento Web & Mobile usando grunt.js
Workflow para desenvolvimento Web & Mobile usando grunt.js
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
"今" 使えるJavaScriptのトレンド
"今" 使えるJavaScriptのトレンド"今" 使えるJavaScriptのトレンド
"今" 使えるJavaScriptのトレンド
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build2015 - Basta! 2015, DE: JavaScript und build
2015 - Basta! 2015, DE: JavaScript und build
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
 
Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!Let Grunt do the work, focus on the fun!
Let Grunt do the work, focus on the fun!
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Javascript is your (Auto)mate
Javascript is your (Auto)mateJavascript is your (Auto)mate
Javascript is your (Auto)mate
 

Recently uploaded

Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 

Recently uploaded (20)

Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 

Hitchhiker's guide to the front end development

  • 1. HITCHHIKER'S GUIDE TO THE FRONT-END @kjy2143 1
  • 2. 11st. Front End Developer 2 . 1
  • 11. 4 . 2
  • 14. 5 . 3
  • 15. 5 . 4
  • 17. 5 . 6
  • 22. scss css $primary-color: #333; @mixin border-radius($radius) { border-radius: $radius; } %message { border: 1px solid #ccc; padding: 10px; } .wrap { @include border-radius(10px); color: $primary-color; .box { display:flex; } } .success { @extend %message; border-color: green; } .error { @extend %message; border-color: red; } .warning { @extend %message; border-color: yellow; } .success, .error, .warning { border: 1px solid #ccc; padding: 10px; } .wrap { border-radius: 10px; color: #333; } .wrap .box { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .success { border-color: green; } .error { border-color: red; } .warning { border-color: yellow; } sass 5 . 11
  • 23. scss css $primary-color: #333; @mixin border-radius($radius) { border-radius: $radius; } %message { border: 1px solid #ccc; padding: 10px; } .wrap { @include border-radius(10px); color: $primary-color; .box { display:flex; } } .success { @extend %message; border-color: green; } .error { @extend %message; border-color: red; } .warning { @extend %message; border-color: yellow; } .success, .error, .warning { border: 1px solid #ccc; padding: 10px; } .wrap { border-radius: 10px; color: #333; } .wrap .box { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .success { border-color: green; } .error { border-color: red; } .warning { border-color: yellow; } sass 5 . 12
  • 24. scss css $primary-color: #333; @mixin border-radius($radius) { border-radius: $radius; } %message { border: 1px solid #ccc; padding: 10px; } .wrap { @include border-radius(10px); color: $primary-color; .box { display:flex; } } .success { @extend %message; border-color: green; } .error { @extend %message; border-color: red; } .warning { @extend %message; border-color: yellow; } .success, .error, .warning { border: 1px solid #ccc; padding: 10px; } .wrap { border-radius: 10px; color: #333; } .wrap .box { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .success { border-color: green; } .error { border-color: red; } .warning { border-color: yellow; } sass 5 . 13
  • 25. scss css $primary-color: #333; @mixin border-radius($radius) { border-radius: $radius; } %message { border: 1px solid #ccc; padding: 10px; } .wrap { @include border-radius(10px); color: $primary-color; .box { display:flex; } } .success { @extend %message; border-color: green; } .error { @extend %message; border-color: red; } .warning { @extend %message; border-color: yellow; } .success, .error, .warning { border: 1px solid #ccc; padding: 10px; } .wrap { border-radius: 10px; color: #333; } .wrap .box { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .success { border-color: green; } .error { border-color: red; } .warning { border-color: yellow; } sass 5 . 14
  • 33. 2016/2017 MUST-KNOW WEB DEVELOPMENT TECH CSS Preprocessor Compile ES2016+ Compile Optimization Linting Unit Testing Module Bundling Package Management 5 . 22
  • 36. module.exports = function(grunt){ grunt.initConfig({ clean: ['dist/'], less: { production: { files: { "src/css/combined.css" : "src/less/main.less" } } }, jshint: { options: { reporter: require('jshint-stylish'), jshintrc: true }, all: ['Gruntfile.js', 'src/js/compiled.js'] }] }); // Add plugins grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-jshint'); // Register tasks grunt.registerTask('default', ['clean', 'jshint']); }; Grunt 6 . 3
  • 39. Automate and enhance your workflow 6 . 6
  • 40. import gulp from 'gulp'; import gulpLoadPlugins from 'gulp-load-plugins'; import del from 'del'; import browserSync from 'browser-sync'; import runSequence from 'run-sequence'; gulp.task('font', () => { return gulp.src(config.src.font) .pipe(gulp.dest(`${config.dist}/font`)); }); gulp.task('img', () => { return gulp.src(config.src.img) .pipe(gulp.dest(`${config.dist}/img`)); }); gulp.task('styles', () => { gulp.src(`${config.src.styles}/custom.scss`) .pipe($.sass({ includePaths: ['./node_modules/material-design-lite/src'] })) .pipe($.minifyCss()) .pipe(gulp.dest(`${config.dist}/css`)) .pipe(browserSync.stream()); }); gulp.task('clean', del.bind(null, [config.dist])); gulp.task('build', cb => { runSequence('clean', ['styles','font', 'img'], cb); }); Gulp 6 . 7
  • 43. { "name": "spinner", "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf dist/tmp", "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "autoprefixer": "postcss -u autoprefixer -r dist/css/*.css", "build:spritesmith": "npm run spritesmith", "build:css": "npm-run-all --sequential sass autoprefixer", "dev:js": "webpack -d --watch --config webpack.dev.config.js", "build:js": "webpack -p --config webpack.prd.config.js", "build": "npm run clean && npm-run-all --sequential build:*", "watch:css": "onchange "src/sass" -- npm run build:css", "watch:js": "onchange "src/js" -- npm run dev:js", "watch": "npm-run-all --parallel watch:*", "serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, doc/**/*.*"", "start": "npm run build && npm-run-all --parallel serve watch" }, "homepage": "https://github.com/poohding/spinner#readme" } npm scripts(package.json) 6 . 10
  • 46. Development Platform & IDE Version Control System & Package Management CSS Preprocess (CSS Concatenating & Minify) (autoprefixer plugin) Optimization goorm.io Git github NPM Sass PostCSS CSS Sprites Image Minify MVC JavaScript Framework + & UI Library JavaScript Task Runner ​ Vanilla JS ES 2016 Webpack Babel.js Vanilla JS NPM Scripts spinner 7 . 2
  • 48. 8 . 2
  • 49. 8 . 3
  • 50. 8 . 4
  • 51. 8 . 5
  • 52. 8 . 6
  • 53. 8 . 7
  • 54. 8 . 8
  • 55. 8 . 9
  • 59. Node.js & NPM Upgrade $ npm -v 1.4.28 $ npm install npm@latest -g $ npm -v 3.10.9 $ node -v v0.10.38 $ npm install -g n $ n stable $ node -v v0.10.38 8 . 13
  • 61. git clone & npm install $ git clone https://github.com/poohding/spinner.git $ cd spinner $ npm install 8 . 15
  • 69. Add HTML $ git checkout add_html 9 . 1
  • 70. 9 . 2
  • 71. 9 . 3
  • 72. Add Sass $ git reset --hard HEAD $ git checkout add_sass 10 . 1
  • 73. { "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "build:spritesmith": "npm run spritesmith", "build:css": "npm run sass", "build": "npm run clean && npm-run-all --sequential build:*" } } npm run build package.json usage 10 . 2
  • 75. Change Image $ git reset --hard HEAD $ git checkout change_image 11 . 1
  • 76. { "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "build:spritesmith": "npm run spritesmith", "build:css": "npm run sass", "build": "npm run clean && npm-run-all --sequential build:*" } } npm run build package.json usage 11 . 2
  • 78. Add Serve $ git reset --hard HEAD $ git checkout add_serve 12 . 1
  • 79. { "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "build:spritesmith": "npm run spritesmith", "build:css": "npm run sass", "build": "npm run clean && npm-run-all --sequential build:*", "watch:css": "onchange "src/sass" -- npm run build:css", "watch": "npm-run-all --parallel watch:*", "serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do "start": "npm run build && npm-run-all --parallel serve watch" } } npm run build npm start package.json usage 12 . 2
  • 80. Add Style $ git reset --hard HEAD $ git checkout add_style 13 . 1
  • 81. { "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "autoprefixer": "postcss -u autoprefixer -r dist/css/*.css", "build:spritesmith": "npm run spritesmith", "build:css": "npm-run-all --sequential sass autoprefixer", "build": "npm run clean && npm-run-all --sequential build:*", "watch:css": "onchange "src/sass" -- npm run build:css", "watch": "npm-run-all --parallel watch:*", "serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do "start": "npm run build && npm-run-all --parallel serve watch" } } npm run build npm start package.json usage 13 . 2
  • 83. Add Webpack $ git reset --hard HEAD $ git checkout add_webpack 14 . 1
  • 84. { "scripts": { "clean": "rimraf dist", "spritesmith": "spritesmith --rc .spritesmith.js && imagemin dist/tmp/* -o dist/img && rimraf d "sass": "node-sass --output-style expanded --source-map true src/sass/*.scss -o dist/css/", "autoprefixer": "postcss -u autoprefixer -r dist/css/*.css", "build:spritesmith": "npm run spritesmith", "build:css": "npm-run-all --sequential sass autoprefixer", "dev:js": "webpack -d --watch --config webpack.dev.config.js", "build:js": "webpack -p --config webpack.prd.config.js", "build": "npm run clean && npm-run-all --sequential build:*", "watch:css": "onchange "src/sass" -- npm run build:css", "watch:js": "onchange "src/js" -- npm run dev:js", "watch": "npm-run-all --parallel watch:*", "serve": "browser-sync start --server --port 8081 --directory --no-ui --files "dist/**/*.*, do "start": "npm run build && npm-run-all --parallel serve watch" } } npm run build npm start package.json usage 14 . 2
  • 85. webpack.common.config.js module.exports = { entry: './src/js/spinner.js', output: { path: './dist/js', filename: 'spinner.bundle.js', }, module: { loaders: [{ test: /.js$/, exclude: /node_modules/, loader: 'babel', query: { presets: ['es2015'] } }] }, plugins: [] }; 14 . 3
  • 86. webpack.dev.config.js var config = require('./webpack.common.config'), webpack = require('webpack'); config.devtool = 'eval'; module.exports = config; 14 . 4
  • 87. webpack.prd.config.js var config = require('./webpack.common.config'), webpack = require('webpack'); config.plugins.push( new webpack.optimize.UglifyJsPlugin({ compressor: { warnings: false, } }) ); config.devtool = 'sourcemap'; module.exports = config; 14 . 5
  • 89. Front End Developer in 2016 15 . 2
  • 91. 2016/2017 MUST-KNOW WEB DEVELOPMENT TECH CSS Preprocessor Compile ES2016+ Compile Optimization Linting Unit Testing Module Bundling Package Management 15 . 4
  • 93. Development Platform & IDE Version Control System & Package Management CSS Preprocess (CSS Concatenating & Minify) (autoprefixer plugin) Optimization goorm.io Git github NPM Sass PostCSS CSS Sprites Image Minify MVC JavaScript Framework + & UI Library JavaScript Task Runner ​ Vanilla JS ES 2016 Webpack Babel.js Vanilla JS NPM Scripts spinner 15 . 6