Make sure you have an NPM & Travis account.
npm init
- update package.json (ref)
- commit & push
npm publish
var ids = [1, 2, 3, 4], | |
details = [], | |
fetch = function (id) { | |
var dfd = new $.Deferred(); | |
new Request({ id: id }, function (res) { | |
dfd.resolve(res); | |
}); | |
return dfd.promise(); |
if (!document.querySelector('[ui-view]')) { | |
console.warn('No root [ui-view] found'); | |
} |
a { | |
border: 1px solid green; | |
color: red; | |
} | |
.hero { | |
color: white; | |
} | |
.hero a { |
// app.translate('foo.bar') renders this.translations.foo.bar | |
// app.translate('foo.bar', 'baz') renders this.translations.foo.bar, replacing any ${} syntax with 'baz' | |
// app.translate('foo.bar', { hello: 'world' }) renders this.translations.foo.bar, replacing ${hello} with 'world' | |
translate (key, replace) { | |
if (!this.translations) { | |
return ''; | |
} | |
let translation = this.translations; |
import { Inject } from 'fd-angular-core'; | |
import { Page, Root } from 'mr-angular-pages'; | |
import { Meta } from 'fd-angular-meta'; | |
import TMPL from './application.html!'; | |
@Page({ | |
templateUrl: TMPL | |
}) | |
export class ApplicationPage { | |
get longTitle () { |
Make sure you have an NPM & Travis account.
npm init
npm publish
📝 Understanding Progressive Enhancement — Aaron Gustafson
Korte uitleg van het basisprincipe achter Progressive Enhancement.
<?php | |
/** | |
* Little helper class to help you measure server performance | |
* | |
* Usage: | |
* $stopwatch = new Stopwatch(); | |
* $stopwatch->start('My expensive operation'); | |
* // Do expensive operation | |
* $stopwatch->stop(); | |
* |
I hereby claim:
To claim this, I am signing this object:
const ask = async (question) => Promise.resolve('Answer ' + question); | |
const questions = [1, 2, 3]; | |
const answers = await questions.reduce(async (accumulator, nextQuestion) => { | |
const allAnswers = await accumulator; | |
const answer = await ask(nextQuestion); | |
return Promise.resolve([...allAnswers, answer]); | |
}, Promise.resolve([])); |