SlideShare a Scribd company logo
1 of 94
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 SnippetsSteve Souders
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularizationstbaechler
 
"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 DukhinFwdays
 
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 VersionPressuJan 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 webLarry 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 WorkflowsAOE
 
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 AppEdureka!
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My SiteSteve Souders
 
Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJSPhilipp 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 JSHanoi 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 nowDerek 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 devsDavidson 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 WorkflowPagepro
 
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 EncoreEngineor
 
(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 usStefan 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 usStefan 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.jsDavidson 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 WebJames 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 RubyFabio 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 buildDaniel Fisher
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupalAndrii 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 - 2Asher Martin
 
Javascript is your (Auto)mate
Javascript is your (Auto)mateJavascript is your (Auto)mate
Javascript is your (Auto)mateCodemotion
 

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

What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New HorizonMorshed Ahmed Rahath
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfJNTUA
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxKarpagam Institute of Teechnology
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological universityMohd Saifudeen
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligencemahaffeycheryld
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniR. Sosa
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...IJECEIAES
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 

Recently uploaded (20)

What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 

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