Skip to content

Commit

Permalink
Add base files
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Nov 2, 2015
0 parents commit 674eaba
Show file tree
Hide file tree
Showing 11 changed files with 1,234 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"stage": 0
}
21 changes: 21 additions & 0 deletions .eslintrc
@@ -0,0 +1,21 @@
{
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"rules": {
"quotes": [2, "single"],
"strict": [2, "never"],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": [
"react"
]
}
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
node_modules
npm-debug.log
.DS_Store
dist
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Dan Abramov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
@@ -0,0 +1,2 @@
## A React Todo App with GraphQL

11 changes: 11 additions & 0 deletions index.html
@@ -0,0 +1,11 @@
<html>
<head>
<title>Sample App</title>
<link rel="stylesheet" type="text/css" href="/static/graphiql.css">
</head>
<body>
<div id='root'>
</div>
<script src="/static/bundle.js"></script>
</body>
</html>
46 changes: 46 additions & 0 deletions package.json
@@ -0,0 +1,46 @@
{
"name": "react-hot-boilerplate",
"version": "1.0.0",
"description": "Boilerplate for ReactJS project with hot code reloading",
"scripts": {
"start": "node server.js",
"lint": "eslint src"
},
"repository": {
"type": "git",
"url": "https://github.com/gaearon/react-hot-boilerplate.git"
},
"keywords": [
"react",
"reactjs",
"boilerplate",
"hot",
"reload",
"hmr",
"live",
"edit",
"webpack"
],
"author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)",
"license": "MIT",
"bugs": {
"url": "https://github.com/gaearon/react-hot-boilerplate/issues"
},
"homepage": "https://github.com/gaearon/react-hot-boilerplate",
"devDependencies": {
"babel-core": "^5.4.7",
"babel-eslint": "^3.1.9",
"babel-loader": "^5.1.2",
"eslint-plugin-react": "^2.3.0",
"react-hot-loader": "^1.3.0",
"webpack": "^1.9.6",
"webpack-dev-server": "^1.8.2"
},
"dependencies": {
"react": "^0.13.0",
"graphiql": "0.3.x",
"graphql": "0.4.x",
"isomorphic-fetch": "*",
"underscore": "1.8.x"
}
}
15 changes: 15 additions & 0 deletions server.js
@@ -0,0 +1,15 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');

new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function (err, result) {
if (err) {
console.log(err);
}

console.log('Listening at localhost:3000');
});
3 changes: 3 additions & 0 deletions src/index.js
@@ -0,0 +1,3 @@
import React from 'react';

React.render(<p>Hello World</p>, document.getElementById('root'));

0 comments on commit 674eaba

Please sign in to comment.