This file contains hidden or 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
gulp.task('copy-js-dir', function() { | |
return ... | |
}) | |
gulp.task('copy-php-files', function() { | |
return ... | |
}) | |
gulp.task('copy-image-files', function() { | |
return ... |
This file contains hidden or 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
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.container { | |
margin-right: auto; | |
margin-left: auto; | |
padding-left: 15px; | |
padding-right: 15px; |
This file contains hidden or 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
<meta charset="UTF-8"> | |
<script src="https://npmcdn.com/[email protected]/mithril.js"></script> | |
<script src="https://npmcdn.com/[email protected]/dist/MSXTransformer.js"></script> | |
<div id="app"></div> | |
<script type="text/msx;harmony=true">void function() { 'use strict'; | |
var App = { | |
view(ctrl, attrs) { | |
return <h1>Hello {attrs.who}!</h1> | |
} |
This file contains hidden or 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
C:\repos\newforms>gulp | |
[01:44:34] Using gulpfile C:\repos\newforms\gulpfile.js | |
[01:44:34] Starting 'lint'... | |
[01:44:34] Starting 'watch'... | |
[01:44:34] Finished 'watch' after 196 ms | |
C:\repos\newforms\lib\Field.js | |
line 6 col 5 'time' is defined but never used. | |
line 7 col 5 'url' is defined but never used. | |
line 10 col 5 'env' is defined but never used. |
This file contains hidden or 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
<script src="http://fb.me/react-with-addons-0.12.2.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script> | |
<script type="text/jsx;harmony=true">void function() { 'use strict'; | |
var App = React.createClass({ | |
render() { | |
return <div> | |
<Hello who="World"/> | |
<Hello who="Reddit"/> | |
</div> |
This file contains hidden or 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
<boolean-attrs> | |
<p><code>riot.version: {opts.version}</code></p> | |
<p>Try using the toggle button before and after clicking on the checkboxes. Not working in v2.0.5.</p> | |
<p><code>bool: {String(this.bool)}</code></p> | |
<label><input type="checkbox" checked={this.bool}> <code>checked=\{this.bool\}</code></label> | |
<br> | |
<label><input type="checkbox" checked={!this.bool}> <code>checked=\{!this.bool\}</code></label> | |
<br> | |
<button type="button" onclick={toggleBool}>Toggle <code>bool</code></button> |
This file contains hidden or 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 CommentList = React.createClass({ | |
render() { | |
return <div className="commentList"> | |
{this.props.data.map(comment => <Comment author={comment.author}> | |
{comment.text} | |
</Comment>)} | |
</div> | |
} | |
}) |
This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Riot.js Test</title> | |
</head> | |
<body> | |
<test-form></test-form> | |
<script src="test-form.tag" type="riot/tag"></script> | |
<script src="test-component.tag" type="riot/tag"></script> | |
<script src="https://raw.githubusercontent.com/muut/riotjs/master/riot.js"></script> |
This file contains hidden or 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 gulp = require('gulp') | |
var flatten = require('gulp-flatten') | |
var flattenRequires = require('gulp-flatten-requires') | |
var npmDir = './npm-react-router' | |
var sourceDirs = 'actions behaviors components locations mixins utils'.split(' ') | |
var sources = sourceDirs.map(function(dir) { return dir + '/*.js' }).concat(['index.js']) | |
gulp.task('npm-js', function() { | |
return gulp.src(sources) |
This file contains hidden or 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 C = React.createClass({ | |
getInitialState: function() { | |
return {1: 2} | |
}, | |
render: function() { | |
return React.createElement('div', 'test') | |
} | |
}) | |
undefined | |
>>> var original = C.type.prototype.getInitialState |