Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xiy committed Sep 23, 2015
1 parent f37534f commit 09bc96d
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules
npm-debug.log
public
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# workshop-react
# Venntro Workshops: React.js

1. Install [Brunch](http://brunch.io/)

npm install -g brunch

2. Create a new project with this skeleton

brunch new gh:xiy/workshop-react APPNAME

3. Start watching with Brunch:

brunch watch --server
13 changes: 13 additions & 0 deletions app/app.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var React = require("react");

var Tick = React.createClass({
render: function() {
return (
<div id="tick">
<h1>Tick Tock</h1>
</div>
);
}
});

React.render(<Tick />, document.getElementById("content"));
12 changes: 12 additions & 0 deletions app/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tick Tock</title>
<script src="app.js"></script>
</head>
<body>
<div id="content"></div>
<script>require('app');</script>
</body>
</html>
17 changes: 17 additions & 0 deletions brunch-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports.config = {
npm: {
enabled: true
},

files: {
javascripts: {
joinTo: 'app.js'
}
},

plugins: {
babel: {
pattern: /\.(js|jsx)$/
}
}
}
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "",
"version": "0.1.0",
"author": "",
"license": "",
"scripts": {
"start": "brunch watch --server"
},
"dependencies": {
"react": "latest"
},
"overrides": {
"react": {
"main": "dist/react.js"
}
},
"devDependencies": {
"babel-brunch": "^5.1.2",
"brunch": "^1.8.5"
},
"private": true
}

0 comments on commit 09bc96d

Please sign in to comment.