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
/** | |
* ////////////////////////////// | |
* webpack 1.x: | |
* ////////////////////////////// | |
*/ | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loaders: ['babel-loader'], |
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
<template> | |
<scroller> | |
<text>{{constr}}</text> | |
</scroller> | |
</template> | |
<script> | |
module.exports = { | |
data () { | |
return { constr: 'list' } |
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
import { rollup } from 'rollup' | |
import postcss from 'rollup-plugin-postcss' | |
import json from 'rollup-plugin-json' | |
import eslint from 'rollup-plugin-eslint' | |
import nodeResolve from 'rollup-plugin-node-resolve' | |
import commonjs from 'rollup-plugin-commonjs' | |
import buble from 'rollup-plugin-buble' | |
const pkg = require('../package.json') | |
const version = pkg.version |
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
<template> | |
<scroller class="list" append="node"> | |
<refresh class="refresh-view" display="{{refresh_display}}" onrefresh="onrefresh"> | |
<loading-indicator style="height:60;width:60" ></loading-indicator> | |
<text class="refresh-arrow" style="text-align: center; color:rgb(238, 162, 54)" if="{{(refresh_display==='hide')}}">Pull To Refresh</text> | |
</refresh> | |
<div class="section" repeat="{{sections}}"> | |
<div class="header"> |
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
#!/bin/bash | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "old email" ] |
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
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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
// author ranyifeng | |
// link: http://www.ruanyifeng.com/blog/2015/05/commonjs-in-browser.html | |
// | |
// Usage | |
// | |
// require.register("browser/debug.js", function(module, exports, require){ | |
// // Module code goes here | |
// }); | |
// | |
// var debug = require("browser/debug.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
#!/usr/bin/env iojs | |
function $for(data, tpl) { | |
return data.map(tpl).join(''); | |
} | |
function $if(condition, datathen, tplthen) { | |
return { | |
$else: function(dataelse, tplelse) { | |
if (!!condition) { |
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
// Simple JavaScript Templating | |
// John Resig - http://ejohn.org/ - MIT Licensed | |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || |
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 React = require('react'); | |
var EventListener = require('react/lib/EventListener'); | |
var partition = require('linear-partitioning'); | |
var TileLayout = React.createClass({ | |
getDefaultProps: function() { | |
return { | |
gutter: 0, | |
photos: [] | |
} |
NewerOlder