Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
fedosejev committed Jul 5, 2016
1 parent 25b368a commit c0a9abe
Show file tree
Hide file tree
Showing 12 changed files with 20,496 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
37 changes: 35 additions & 2 deletions README.md
@@ -1,2 +1,35 @@
# react-project-starter
Simple React.js project starter kit.
# Simple React.js Project Starter Kit

## Install

1. `npm install`
2. `npm install --global http-server`

## Run

1. `gulp`
2. `http-server ./build`
3. Open `http://localhost:8080` in a web browser.

## Project Structure

+ `source` - all source files.
+ `js` - all JavaScript files.
+ `components` - all React.js component files.
+ `Application.jsx` - React.js component that encapsulates the entire React.js application.
+ `app.jsx` - main React.js application file that renders `Application.jsx` component.
+ `index.html` - main HTML file.
+ `build` - all build files.
+ `js` - all JavaScript files.
+ `app.js` - bundled (and minified) JavaScript file.
+ `index.html` - main HTML file.

## Helpful Bash Scripts

`./commit-and-push-to-github.sh` - commits all changes in working directory and pushes them to GitHub.
`./build-for-production.sh` - exports environment variable and runs Gulp task.
`./publish-on-github-pages.sh` - runs `./commit-and-push-to-github.sh`, `./build-for-production.sh` and pushes `./build` directory to `gh-pages` branch on GitHub.

## Author

[Artemij Fedosejev](http://artemij.com)
7 changes: 7 additions & 0 deletions build-for-production.sh
@@ -0,0 +1,7 @@
#!/bin/bash

# React needs this for production build
export NODE_ENV=production

# Run Gulp task
gulp build-for-production
16 changes: 16 additions & 0 deletions build/index.html
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>Application</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div data-react-application>
<h5 class="text-center text-muted">Loading application...</h5>
</div>

<script src="./js/app.js"></script>
</body>
</html>

0 comments on commit c0a9abe

Please sign in to comment.