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
type Todo { | |
completed : bool | |
text : string | |
} | |
state Todos { number: Todo } { | |
completed < filter('completed') | |
uncompleted < intersect(completed) | |
add(data) { |
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
store Tasks { | |
@tasks = [] | |
@undone <- @tasks.filter(task => !task.done) | |
makeTask(task) { return { title: title, done: false } } | |
addTask() { @tasks.push(makeTask(task)) } | |
clear() { @tasks = @undone } | |
} |
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
return ( | |
<ListItem.item | |
key={key || index} | |
onTap={this.handleTap.bind(this)} | |
title={article.get('title')} | |
after={articleRight} | |
index={index} | |
noicon | |
{...props}> | |
{stats} |
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
store Farm { | |
@animals = ['cow', 'chicken', 'turkey'] | |
} | |
view Main { | |
@name = 'Horse' | |
setAnimal = animal => @name = animal | |
<h1>Select your favorite animal</h1> |
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
if (t.isArrayExpression(node.right)) { | |
let staticProps = [] | |
node.right.elements = node.right.elements.map(el => { | |
if (!t.isObjectExpression(el)) return el | |
let { statics, dynamics } = extractStatics(el) | |
if (statics.length) staticProps.push(statics) | |
if (dynamics.length) return t.objectExpression(dynamics) | |
else return null |
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
view SayHi { | |
let size = 10 | |
<h1>hello</h1> | |
<button onClick={() => size += 20}>up</button> | |
$h1 = { fontSize: size, color: 'blue' } | |
} |
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
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed. | |
* | |
* If you are unfamiliar with LESS, you can read more about it here: | |
* http://www.lesscss.org | |
*/ |
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 fns from './a' | |
view One { | |
var a = fns.aa() | |
} | |
view Two { | |
var b = fns.bb() | |
} |
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
module.exports = { | |
loaders: | |
[ | |
{ test: /\.css$/, loaders: ['style', 'css'] }, | |
{ test: /\.json$/, loader: "json" } | |
], | |
// resolveLoader: { | |
// root: '/Users/nw/flint/packages/runner' | |
// }, | |
resolve: { |
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 {spring} from 'react-motion' | |
view Carousel { | |
const context = initContext(view, { | |
colors: atom() | |
}) | |
const pro = initPro(view, { | |
children: atom(), | |
width: M.defaultAtom(200), |