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": "test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"riot": "^3.4.2" | |
}, | |
"devDependencies": { | |
"coffee-script": "^1.12.5", |
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 sequence(promises) { | |
return new Promise((resolve, reject) => { | |
const rets = [] | |
const gen = (function*() { | |
// loop as long as we have promises in the queue | |
while (promises.length) { | |
// take always the first promise | |
const promise = promises.shift() | |
// wait until it's resolved to step to the next iteration | |
promise |
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
/** | |
* Deal with the localStorage avoiding odd issues due to paranoids that have disabled it by default | |
*/ | |
const ls = window.localStorage | |
/** | |
* Call any method on the localStorage avoiding to throw errors | |
* @param {string} method - method we want to call | |
* @param {array} args - serialized params that will be proxied to the method we are going to call | |
* @returns {null|string} whatever the method call will 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
<main-tag> | |
<h1>I got the power!</h1> | |
<h2>The answer is { answer }</h2> | |
<script> | |
import something from './something' | |
this.answer = something.answer | |
</script> | |
</main-tag> |
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
{ | |
"secret-message": "hello" | |
} |
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 b = require('./b') | |
b.b = 'c' | |
module.exports = { | |
a: 'a' | |
} |
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
//** Dependencies **// | |
const path = require('path'); | |
const webpack = require('webpack'); | |
//** Options **// | |
const paths = require('./paths.js').paths; | |
const envUtil = require('../util/env'); | |
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
<cool> | |
<p>Hi { message() }</p> | |
<script> | |
message() { | |
return 'there' | |
} | |
</script> | |
<style type="postcss" scoped> |