Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
[api]: New apis / changes to apis | |
[test]: Update test/* files | |
[dist]: Changes to submodules, version bumps, updates to package.json | |
[minor]: Small changes | |
[doc]: Updates to documentation | |
[ux]: Updates to UX | |
[fix]: Bug fixes | |
[bin]: Update binary scripts associated with the project | |
[merge]: Resolved git merge from upstream or otherwise | |
[refactor]: Refactor of existing code with no external API changes |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
$ = jQuery | |
$.fn.lineHeight or= -> | |
if height = @data('lineHeight') | |
return height | |
# Create a hidden div with the same font | |
# properties, then measure its height | |
$shadow = $('<span />') | |
$shadow.css({ |
(function () { | |
var makeCallback = function(eventType, observer) { | |
if (eventType === 'value') { | |
return function(snap) { | |
observer.onNext(snap); | |
}; | |
} else { | |
return function(snap, prevName) { | |
// Wrap into an object, since we can only pass one argument through. | |
observer.onNext({snapshot: snap, prevName: prevName}); |
Deprecated. See https://www.polymer-project.org/articles/unit-testing-elements.html for the latest version.
Note: this guide is a work-in-progress and will be added to the Polymer docs when it's ready. We have updated <seed-element>
to include unit tests and this guide has been moved to Google docs. Expect a version on the Polymer site before the end of September.
After spending days working on your <super-awesome>
Polymer element, you’re finally ready to share it with the rest of the world. You add the code for using it to your demo, iterate on it over time and come back to it one day when..uh oh. The demo broke because something has gone horribly wrong. Suddenly, <super-awesome>
isn’t starting to look so great. Now you’re stuck trying to backtrack through your commit log to figure out how you broke the code. You’re not going to have a fun time.
If you’ve been working on the front-end for a while, even if you haven’t really played with Polymer elements before, this s
// F#'s "pipe-forward" |> operator | |
// | |
// Also "Optional-chaining" operators |>! and |>& | |
// | |
// And adapters for standard library map/filter/sorted | |
infix operator |> { precedence 50 associativity left } | |
infix operator |>! { precedence 50 associativity left } | |
infix operator |>& { precedence 50 associativity left } | |
infix operator |>* { precedence 50 associativity left } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// give it a name so it reuses the same window | |
var win = window.open(null, "redux-devtools", "menubar=no,location=no,resizable=yes,scrollbars=no,status=no"); | |
// reload in case it's reusing the same window with the old content | |
win.location.reload(); | |
// wait a little bit for it to reload, then render | |
setTimeout(function() { | |
React.render( | |
<DebugPanel top right bottom left > |