/.../
: Start and end regex delimiters|
: Alternation()
: Grouping
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
/* file path: ./views/Posts */ | |
'use strict'; | |
var React = require('react'); | |
var PostIndex = React.createClass({ | |
render: function() { | |
var posts = this.props.posts.map(function(post, index) { | |
return ( |
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
/** @jsx React.DOM */ | |
var TodoAdd = React.createClass({displayName: 'TodoAdd', | |
getInitialState: function() { | |
return { text: '' }; | |
}, | |
changeText: function(e) { | |
this.setState({ text: e.target.value }); | |
e.preventDefault(); | |
}, |
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
/* | |
* Function that calculate the average of a number | |
* | |
* @param {Number} num | |
* @param {Number} divisor | |
* @return {Number} simple arithmetic average of num | |
* | |
*/ | |
var calcAverage = (num, divisor) => (num / divisor).toFixed(2); |
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 all-retina-sprites($map, $map2x) { | |
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
$base-class: sprite-map-name($map); | |
.#{$base-class}-all-retina-sprites { |
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
var query_960 = 'screen and (min-width: 45em)'; | |
enquire.register($query_960, { | |
deferSetup : true, | |
setup : function() { | |
// load content via AJAX | |
}, | |
match : function() { | |
// show sidebar |
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
module.exports = function(grunt) { | |
var config = {}; | |
// Set all the tasks you want to load. | |
var tasks = [ | |
, "grunt-contrib-concat" | |
, "grunt-contrib-uglify" | |
, "grunt-contrib-jshint" | |
, "grunt-contrib-watch" | |
]; |
Utilizo por padrão os seguinte plugins em meus projetos:
PLUGIN | DESCRIÇÃO | LINK |
---|---|---|
Server | ||
grunt-contrib-watch | Observa as mudanças dos arquivos | https://npmjs.org/package/grunt-contrib-watch |
grunt-contrib-connect | Inicia um servidor web estático | https://npmjs.org/package/grunt-contrib-connect |
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
'use strict'; | |
(function(window, document) { | |
// Your starting point. Enjoy the ride! | |
})(window, document); |
OlderNewer