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
// loaction: loaders/es-preset.js | |
// This file is a combination of the following babel presets: | |
// es2015, react, stage-0. | |
// Difference is that the es2015-template-literals is taken out. Of the es2015 preset. | |
// This allows us to run relay transformations on the code afterwards (which will then transform any remaining template literals). | |
module.exports = preset({}); | |
function preset(context, opts) { | |
var moduleTypes = ["commonjs", "amd", "umd", "systemjs"]; | |
var loose = false; |
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
[options] |
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
class List<T> { | |
_list: T[]; | |
constructor(list: T[]){ | |
this._list = list; | |
} | |
push(value: T) : List<T> { | |
var newValues = this._list.slice(0); | |
newValues.push(value); |
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 state = Immutable.fromJS({ | |
product_preview: { | |
product_type: '', | |
media_items: [ | |
{id: 0, url: 'my_url'}, | |
{id: 1, url: 'my_url'}, | |
{id: 2, url: 'my_url'} | |
], | |
}, | |
}); |
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 estreeWalker = require('estree-walker'); | |
module.exports = function(ast, mapper){ | |
estreeWalker.walk(ast, { | |
enter: function(node, parent){ | |
if(node.type !== 'CallExpression'){ | |
return; | |
} | |
if(node.callee.type == 'Identifier'){ | |
if(node.callee.name == 'require' || node.callee.name == 'define'){ | |
// AMD style require/defines |
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
declare module "immutable" { | |
declare class Iterable<K, V> { | |
static isIterable(maybeIterable: any): boolean; | |
static isKeyed(maybeKeyed: any): boolean; | |
static isIndexed(maybeIndexed: any): boolean; | |
static isAssociative(maybeAssociative: any): boolean; | |
static isOrdered(maybeOrdered: any): boolean; | |
toArray(): Array<V>; | |
toIndexedSeq(): IndexedSeq<V>; |
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
###* | |
* RequireJS component plugin | |
* @author Brian K. Christensen, Secoya A/S <[email protected]> | |
* @version 0.9.1 | |
* @license BSD | |
### | |
define [], () -> | |
class ComponentModule | |
_config: |
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
sudo apt-get install python g++ make checkinstall | |
mkdir src && cd $_ | |
wget -N http://nodejs.org/dist/node-v0.10.18.tar.gz | |
tar xzvf node-v0.10.18.tar.gz && cd node-v0.10.18 | |
umask 0022 | |
./configure | |
make | |
checkinstall -D --umask 0022 --reset-uids --install=no --requires=libc6,libgcc1,libstdc++6,rlwrap [email protected] --pkgversion=0.10.18 --no-doc --pkgname node |