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": "project-quick-start", | |
"version": "1.0.0", | |
"description": "npm install; npm run base; npm start", | |
"main": "", | |
"scripts": { | |
"start": "npm-run-all --parallel js:watch css:watch", | |
"base": "npm-run-all base:dirs base:js base:css base:html", | |
"base:dirs": "mkdirp src", |
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
const html = require('choo/html') | |
const choo = require('choo') | |
function Body(state, emit) { | |
let input; | |
return html` | |
<body> | |
<ul> | |
${state.todos.map(todo => ( |
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 Promise = require('rsvp').Promise; | |
function foo() { | |
return new Promise(function(resolve, reject) { | |
console.log("We're running..."); | |
// We totally resolve and all is good ... | |
resolve(); | |
}); | |
} |
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 Promise = require('rsvp').Promise; | |
new Promise(function() { | |
console.log("We're running..."); | |
// nothing happens, this error is silently swallowed. and yes this could just as | |
// well be a typo. issue: https://github.com/stefanpenner/es6-promise/issues/70 | |
throw 'err'; | |
console.log("We'll never get here."); |
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 Promise = require('rsvp').Promise; | |
function MyCoolErr() {} | |
function foo() { | |
return new Promise(function(resolve, reject) { | |
console.log("We're running..."); | |
// Resolve and all is good ... | |
resolve(); |
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 Promise = require('es6-promise').Promise; | |
function MyCoolErr() {} | |
function foo() { | |
return new Promise(function(resolve, reject) { | |
console.log("We're running..."); | |
// Resolve and all is good ... | |
resolve(); |
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 Promise = require('yaku'); | |
function MyCoolErr() {} | |
function foo() { | |
return new Promise(function(resolve, reject) { | |
console.log("We're running..."); | |
// Resolve and all is good ... | |
resolve(); |
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 Promise = require('bluebird'); | |
new Promise(function() { | |
console.log("We're running..."); | |
// A crazy error is thrown here, but you will see this in your Chrome console. | |
// Seems like Bluebird has the right default here! | |
throw 'Nice job Bluebird'; | |
console.log("We'll never get here."); |
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 Promise = require('es6-promise').Promise; | |
function foo() { | |
return new Promise(function(resolve, reject) { | |
console.log("We're running..."); | |
// We totally resolve and all is good ... | |
resolve(); | |
}); | |
} |
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
// http://requirebin.com/?gist=8f13d5147c1c252ab1691115bfa8b7c5 | |
var Promise = require('es6-promise').Promise; | |
new Promise(function() { | |
console.log("We're running..."); | |
// nothing happens, this error is silently swallowed. and yes this could just as | |
// well be a typo. issue: https://github.com/stefanpenner/es6-promise/issues/70 | |
throw 'err'; |
NewerOlder