This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Mixin to prefix a property | |
/// @author Hugo Giraudel | |
/// @param {String} $property - Property name | |
/// @param {*} $value - Property value | |
/// @param {List} $prefixes (()) - List of prefixes to print | |
@mixin prefix($property, $value, $prefixes: ()) { | |
@each $prefix in $prefixes { | |
#{'-' + $prefix + '-' + $property}: $value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WITH JSON */ | |
// Create with JSON | |
var user = { name: 'Mehmet Burak Erman', age: 22 } | |
localStorage.setItem('user', JSON.stringify(user)); | |
// Read | |
console.log( JSON.parse(localStorage.getItem('user')) ); | |
// or | |
console.log( JSON.parse(localStorage.getItem('user')).name ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <div id="box">Lorem</div> | |
// Our goal is to make text color red | |
var Makered = function(selector) { | |
this.el = document.querySelector(selector); // for multiple elements use querySelectorAll | |
} | |
Makered.prototype.makered=function() { | |
this.el.style.color="red"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LIVE RELOAD ✔ | |
SCSS TO CSS ✔ | |
MINIFY CSS ✔ | |
PREFIX CSS ✔ | |
MINIFY JS ✔ | |
TRANSPILE JS ✔ | |
*/ | |
var gulp = require("gulp"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/facebook/react/issues/3725 | |
... | |
static get defaultProps() { | |
return { | |
count:1 | |
} | |
} | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1:)let | |
var name = "burak"; | |
console.log(name); | |
//or use let | |
let name2 = "burak2"; | |
console.log(name2); | |
// Why we would use let instead of var? | |
/* In js, there is global and local scope but js doesn't really have a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let person = { | |
age:23, | |
name:"Mehmet Burak Erman", | |
show: function() { | |
return this.name; | |
} | |
} | |
function foo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webpack-sass", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "webpack-dev-server --open --mode development", | |
"build": "webpack -p" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.0", | |
"babel-loader": "^7.1.4", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webpack-postcss, | |
"version": "1.0.0", | |
"scripts": { | |
"start": "webpack-dev-server --open --mode development", | |
"build": "webpack -p" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.0", | |
"babel-loader": "^7.1.4", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer