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
/* | |
* Require our plugins. | |
*/ | |
var gulp = require('gulp'), | |
debug = require('gulp-debug'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), |
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
This example uses Browserify and expects a stucture like | |
|- gulpfile.js | |
| | |
|- package.json | |
| | |
|- [javascript] | |
| | | |
| | - app.js | |
| | |
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 = getPromise('http://api.icndb.com/jokes/random') | |
promise.then(function(data) { | |
console.log('Got data! Promise fulfilled.'); // 1st request finished | |
// 2nd request | |
return getPromise('http://api.icndb.com/jokes/random'); | |
}).then(function(result) { | |
console.log('the final result'); | |
}); |
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
Show hidden characters
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
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
{ | |
"user": { | |
"name": "Lonely Bob", | |
"handle": "lonelyBob" | |
}, | |
"message": "Oh man, did you just hear that? What was that?!!!", | |
"favourited": true | |
} |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #f5f8fa; | |
font: 16px/22px Arial, sans-serif; | |
margin: 0; | |
} | |
.statList { | |
background: #fff; |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #f5f8fa; | |
font: 16px/22px Arial, sans-serif; | |
margin: 0; | |
} | |
.statList { | |
background: #fff; |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #f5f8fa; | |
font: 16px/22px Arial, sans-serif; | |
margin: 0; | |
} | |
.statList { | |
background: #fff; |
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
<html> | |
<head> | |
<style> | |
body { | |
background: #f5f8fa; | |
font: 16px/22px Arial, sans-serif; | |
margin: 0; | |
} | |
.statList { | |
background: #fff; |
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
{ | |
"users": [ | |
{ | |
"firstName": "Max", | |
"lastName": "Wheeler", | |
"username": "maxwheeler", | |
"checkedIn": true | |
}, | |
{ | |
"firstName": "Tim", |