-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created with `nwb new react-app react-nwb-github-issues`
- Loading branch information
0 parents
commit b7559f5
Showing
10 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/coverage | ||
/node_modules | ||
/public/build | ||
npm-debug.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
node_js: | ||
- 4.2 | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- npm install codecov.io coveralls | ||
|
||
after_success: | ||
- cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js | ||
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
|
||
branches: | ||
only: | ||
- master |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# react-nwb-github-issues | ||
|
||
Collaborating on this React app: | ||
|
||
## Prerequisites | ||
|
||
You will need the following things properly installed on your computer. | ||
|
||
* [Git](http://git-scm.com/) | ||
* [Node.js](http://nodejs.org/) (with npm) | ||
* [nwb](https://github.com/insin/nwb/) - `npm install -g nwb` | ||
|
||
## Installation | ||
|
||
* `git clone <repository-url>` this repository | ||
* change into the new directory | ||
* `npm install` | ||
|
||
## Running / Development | ||
|
||
* `nwb serve` will run the app | ||
* Visit the app at [http://localhost:3000](http://localhost:3000) | ||
|
||
### Running Tests | ||
|
||
* `nwb test` will run the tests once | ||
* `nwb test --server` will run the tests on every change | ||
|
||
### Building | ||
|
||
* `nwb build` (production) | ||
* `nwb build --set-env-NODE_ENV=development` (development) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
// Let nwb know this is a React app when generic build commands are used | ||
type: 'react-app' | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "react-nwb-github-issues", | ||
"version": "0.0.1", | ||
"description": "Describe react-nwb-github-issues here", | ||
"private": true, | ||
"scripts": { | ||
"build": "nwb build", | ||
"clean": "nwb clean", | ||
"start": "nwb serve", | ||
"test": "nwb test" | ||
}, | ||
"dependencies": { | ||
"react": "~0.14.0", | ||
"react-dom": "~0.14.0" | ||
}, | ||
"devDependencies": { | ||
"nwb": "~0.3.0-beta.0" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"repository": "" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>react-nwb-github-issues</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="build/vendor.css"> | ||
<link rel="stylesheet" href="build/app.css"> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="build/vendor.js"></script> | ||
<script src="build/app.js"></script> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
export default React.createClass({ | ||
render() { | ||
return <div> | ||
<h2>Welcome to React</h2> | ||
</div> | ||
} | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react' | ||
import {render} from 'react-dom' | ||
|
||
import App from './App' | ||
|
||
render(<App/>, document.querySelector('#app')) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"env": { | ||
"mocha": true | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import expect from 'expect' | ||
import React from 'react' | ||
import {render, unmountComponentAtNode} from 'react-dom' | ||
|
||
import App from 'src/App' | ||
|
||
describe('App component', () => { | ||
let node | ||
|
||
beforeEach(() => { | ||
node = document.createElement('div') | ||
}) | ||
|
||
afterEach(() => { | ||
unmountComponentAtNode(node) | ||
}) | ||
|
||
it('displays a welcome message', () => { | ||
render(<App/>, node, () => { | ||
expect(node.innerHTML).toContain('Welcome to React') | ||
}) | ||
}) | ||
}) |