Eclipse @ eBay fileV3 Exponential Growth C++ Replaced with Java (2001) Front-end not changed
World is changed. i feel it in the front end
-
Upload
andriy-yun -
Category
Engineering
-
view
219 -
download
4
Transcript of World is changed. i feel it in the front end
![Page 1: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/1.jpg)
World is changed. I feel it in the FrontEnd
SERGIY BORODULINFrontEnd developer, Skilld
ANDRIY YUNFullStack developer, Skilld
![Page 2: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/2.jpg)
Nestings in Drupal themes
![Page 3: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/3.jpg)
Big nestings in projects. Why we need it?
![Page 4: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/4.jpg)
Scheme
Drupal Core
Theme (Omega, Zen)
Subtheme (Projects theme)
![Page 5: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/5.jpg)
What we have at first
- Drupal Core
-- Omega, Zen theme
--- Project theme
---- Subdomain theme with nesting styles and variables
![Page 6: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/6.jpg)
Core theme - what is this?
Submodule
![Page 7: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/7.jpg)
Structure in core & projects themes
SMACSS Gulp Folder
![Page 8: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/8.jpg)
- Gulp -- settings.js -- scripts.js -- lint.js -- bower.js -- styles.js- gulp.js
Gulp as modular system
![Page 9: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/9.jpg)
var gulp = require('gulp');
var requireDir = require('require-dir');requireDir('./gulp-tasks');
gulp.task('default', ['scripts', 'sass'], function () { gulp.watch('src/js/**/*.js', ['scripts']); gulp.watch('src/sass/**/*.{sass,scss}', ['sass']);});
![Page 10: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/10.jpg)
hub(settings.core.hubpath);
gulp.task('injectFiles', function () {});
Gulp file in project
![Page 11: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/11.jpg)
Problems & possible solutions
bulky for small projectstransfer gulp options from project to core tasks
gulp as git submodulemove gulp from core theme to project theme
![Page 12: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/12.jpg)
http://macr.ae/article/splitting-gulpfile-multiple-files.html
https://www.npmjs.com/package/gulp-hub
https://www.npmjs.com/package/gulp-inject
Links
![Page 13: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/13.jpg)
Reuse templates
![Page 14: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/14.jpg)
Twig
![Page 15: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/15.jpg)
![Page 16: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/16.jpg)
Parent file
{# This empty block allows child templates
to insert markup into this place in the
header without re-writing the entire
template. #}
{% block header_fields %}
{% endblock %}
![Page 17: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/17.jpg)
New file
{# Override the header_fields block to put
field_image there because this site needs it
there. #}
{% block header_fields %}
{{ content.field_image }}
{% endblock %}
![Page 18: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/18.jpg)
Extends, Parent
{% extends "base.html" %}
{% block sidebar %} <h3>Table Of Contents</h3> ... {{ parent() }}{% endblock %}
![Page 19: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/19.jpg)
Libraries overridetheme.librarie.yaml
libraries-override:
# Replace an entire library.
core/drupal.collapse: mytheme/collapse
# Replace an asset with another.
subtheme/library:
css:
theme:
css/layout.css: css/my-layout.css
![Page 20: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/20.jpg)
Libraries removetheme.librarie.yaml
# Remove an asset.
drupal/dialog:
css:
theme:
dialog.theme.css: false
# Remove an entire library.
core/modernizr: false
![Page 21: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/21.jpg)
Libraries extend
# Extend drupal.user: add assets from
classy's user libraries.
libraries-extend:
core/drupal.user:
- classy/user1
- classy/user2
![Page 22: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/22.jpg)
Build toolsProblems and approaches
![Page 23: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/23.jpg)
Using Stats
2014 2015 2016 2014 2015 2016
GH Watchers -- 563 617 -- 653 1021
GH Stars 8235 9466 10882 7537 13540 21316
Plugins -- 4663 5730 -- 1561 2431
npm downloads 7794k 15910k -- 2374k 14494k --
![Page 24: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/24.jpg)
Gulp, not Grunt
fastersimpler
code oriented
configuration orientedhard to support
slower
![Page 25: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/25.jpg)
LintersWhy we need it?
![Page 26: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/26.jpg)
Coding Standards
CSS standards
https://www.drupal.org/coding-standards/css
JS standards
https://www.drupal.org/node/172169
![Page 27: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/27.jpg)
Have you configured your editor?http://dgo.to/147789#ide
Editors
Atom Komodo Edit
Notepad++ Sublime Text
IDE
Eclipse Netbeans
Komodo IDE PhpStorm
![Page 28: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/28.jpg)
Core linters
CSS LINT
Drupal core
ESlint
CSSlint config - http://dgo.to/2222049
ESlint setting - http://dgo.to/1955232
csslint.net eslint.org
![Page 29: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/29.jpg)
SASS Linters
scss-lint github.com/brigade/scss-lint
sass-lintgithub.com/sasstools/sass-lint
![Page 30: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/30.jpg)
is dead,
Long live the !!!
![Page 31: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/31.jpg)
Your power for build frontend stuff
![Page 32: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/32.jpg)
1. install docker
2. pull or build docker image
3. call build command inside container
Docker based frontend worflow
![Page 33: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/33.jpg)
Frontend trends in Drupal world
![Page 34: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/34.jpg)
TWIG
![Page 35: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/35.jpg)
NO PHP in front-end
![Page 36: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/36.jpg)
Full control for view in Twig
![Page 37: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/37.jpg)
SVG icon in menu without problem
{% set description = item.original_link.getDesctiption()|split(' | ') %}{% set linktitle = description.0 %}{% set svgicon = description.1 %}
{% set svgicon %}<span class="main-menu__icon">
<svg viewBox="0 0 128 128"><use xlink:href="/menu-icon.svg#{{ svgicon }}"></use>
</svg></span><span class="main-menu__title">{{ item.title }}</span>
{% endset %}
![Page 38: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/38.jpg)
Result
![Page 39: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/39.jpg)
Styleguidedriven development
![Page 40: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/40.jpg)
KSShttp://warpspire.com/kss
A methodology for documenting CSS and generating styleguides
![Page 41: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/41.jpg)
check styleguide regarding new
feature
Workflow
rebuild styles and stylesguide
Add new or reuse existing styles
![Page 42: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/42.jpg)
KSS in action1. Add comment by the // for you styles
2. Add styleguide building stepto gulp or grunt
![Page 43: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/43.jpg)
KSS demo
![Page 44: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/44.jpg)
Links
Sessionshttps://events.drupal.org/losangeles2015/sessions/style-guide-
driven-development-all-hail-robot-overlords
https://events.drupal.org/neworleans2016/sessions/six-easy-pieces-
new-front-end-development
kss-node packagehttps://github.com/kss-node/kss-node
![Page 45: World is changed. i feel it in the front end](https://reader033.fdocuments.in/reader033/viewer/2022042722/58a397461a28abb1348b51c3/html5/thumbnails/45.jpg)
Andriy Yun, Kyiv
[email protected]/u/andriyun
skype: c_cluber
Any questions?
Sergiy Borodulin, Lutsk
[email protected]/u/hogskype: hog_seruj