Deployment to Github pages by Travis CI
box-sizing: padding-box
is not supported
- utilities:
.u-clearfix
,.u-cf
- ComponentName:
.Component
,.MyComponent
- ComponentName-descendentName:
.Component-header
,.Component-bodyText
- ComponentName--modifierName:
.Component--default
,.Component--primary
- ComponentName.is-stateOfComponent:
.Component.is-blue
,.MyComponent.is-blue
,.Component.is-stateOfComponent
- Async vs Defer script loading differences: https://bitsofco.de/async-vs-defer/
- undeclared, undefined, null
undeclared
- variables don’t even existundefined
- variables exist, but don’t have anything assigned to themnull
- variables exist and have null assigned to them
- instead of
document.getElementsByClassName('className')[0].getElementsByTagName('tagName')
you can use:document.querySelectorAll('.className tagName')
- Scope vs Context:
- Scope - function-based, variables visibility
- Context - object-based, value of
this
keyword, refers to the object to which a function belongs
- Design Patterns:
- Cookies are not supported for local files:
file:///
- XMLHttpRequest Events:
loadstart
- fired whenprogress
has begunprogress
- operation is in progress, data loadingload
- loading is finished, data is readyabort
- loading is abortederror
- fired when an error occurredtimeout
- fired whenprogress
operation is terminated due to preset time expiringloadend
- whenprogress
has stopped (afterload
,abort
orerror
have been dispatched)
- Ajax - Asynchronous request technique based on
XMLHttpRequest
or ES6fetch()
method - In ES6 you can marked
var
as deprecated- To declare objects and arrays you should use
const
(as often as possible) - If you cannot use
const
, uselet
- To declare objects and arrays you should use
- Install NodeJS: https://nodejs.org/en/download/
npm init
npm install --save-dev webpack sass-loader css-loader html-loader style-loader file-loader html-webpack-plugin node-sass babel babel-core babel-loader babel-preset-env extract-text-webpack-plugin webpack-dev-server clean-webpack-plugin
touch webpack.config.js
- Fill webpack.config.js file by dependencies configuration
mkdir webpack && touch webpack/index.js ...
npm run build
npm install
npm run build
npm run start
and visit localhost:8080