Skip to content

Commit 50d6b89

Browse files
committed
tooling - part 5
1 parent 2112054 commit 50d6b89

File tree

7 files changed

+18
-29
lines changed

7 files changed

+18
-29
lines changed

thumbnail-gulp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
main.js

thumbnail-gulp/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<head>
2-
<script src="http://fb.me/react-0.13.0.js"></script>
3-
<script src="application.js"></script>
42
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
53
</head>
64
<body>
75
<div class="container">
86
</div>
97
</body>
8+
<script src="main.js"></script>

thumbnail-gulp/main.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

thumbnail-gulp/src/app.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
var React = require('react');
2+
var ThumbnailList = require('./thumbnail-list');
3+
14
var options = {
25
thumbnailData: [{
36
title: 'Show Courses',
4-
number: 12,
7+
number: 120,
58
header: 'Learn React',
69
description: 'React is a fantastic new front end library for rendering web pages. React is a fantastic new front end library for rendering web pages.',
710
imageUrl: 'https://raw.githubusercontent.com/wiki/facebook/react/react-logo-1000-transparent.png'
@@ -14,5 +17,6 @@ var options = {
1417
}]
1518
};
1619

20+
1721
var element = React.createElement(ThumbnailList, options);
1822
React.render(element, document.querySelector('.container'));

thumbnail-gulp/src/badge.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var Badge = React.createClass({
1+
var React = require('react');
2+
3+
module.exports = React.createClass({
24
render: function() {
35
return <button className="btn btn-primary" type="button">
46
{this.props.title} <span className="badge">{this.props.number}</span>

thumbnail-gulp/src/thumbnail-list.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
var ThumbnailList = React.createClass({
1+
var React = require('react');
2+
var Thumbnail = require('./thumbnail');
3+
4+
module.exports = React.createClass({
25
render: function() {
36
var list = this.props.thumbnailData.map(function(thumbnailProps){
47
return <Thumbnail {...thumbnailProps} />

thumbnail-gulp/src/thumbnail.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
var Thumbnail = React.createClass({
1+
var React = require('react');
2+
var Badge = require('./badge');
3+
4+
module.exports = React.createClass({
25
render: function() {
36
return <div className="col-sm-6 col-md-4">
47
<div className="thumbnail">

0 commit comments

Comments
 (0)