Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

test2 #6

Open
wants to merge 55 commits into
base: crud
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e3e4585
Change build system to create-react-app
ariesmcrae Mar 17, 2017
3cf8aca
Add Jest test for apiReducer and FileInput
ariesmcrae Mar 18, 2017
c2cfe6f
Add action creators and action thunk tests for jest
ariesmcrae Mar 20, 2017
349dd8c
Refactor location of tests
ariesmcrae Mar 20, 2017
3879c8a
Add coverage to gitignore
ariesmcrae Mar 20, 2017
9e00a50
Finish writing all test for reducers
ariesmcrae Mar 20, 2017
6a744b8
Finish writing tests for all common components
ariesmcrae Mar 20, 2017
31928cc
Finish writing tests for root components
ariesmcrae Mar 20, 2017
189242a
Upgrade updated package jquery
ariesmcrae Mar 20, 2017
14d355f
Finish writing tests for course
ariesmcrae Mar 21, 2017
a476bda
Finish writing all components that can be tested
ariesmcrae Mar 21, 2017
53130f6
Add feature delete to the create-react-app branch
ariesmcrae Mar 23, 2017
ad70329
Fix linting issues
ariesmcrae Mar 23, 2017
cad4b98
Remove table responsiveness
ariesmcrae Mar 23, 2017
08836bc
Upgrade outdated redux-form
ariesmcrae Mar 24, 2017
1ac6fa5
Refactor to use arrow function syntax
ariesmcrae Mar 24, 2017
380c188
Upgrade outdated enzyme package
ariesmcrae Mar 25, 2017
da16f24
WIP replaced table with react-bootstrap-table
ariesmcrae Mar 25, 2017
0503001
Finish converting table to react-bootstrap-table
ariesmcrae Mar 26, 2017
b92b8ac
Fix landing page description
ariesmcrae Mar 26, 2017
a08672b
Upgrade outdated pakcages redux-form and enzyme
ariesmcrae Mar 26, 2017
4080606
Merge branch 'reacte-react-app' into create-react-app
ariesmcrae Mar 26, 2017
cb660e1
Add url to title
ariesmcrae Mar 26, 2017
2282ba1
Fix linting issues
ariesmcrae Mar 27, 2017
4d1db3c
Add license
ariesmcrae Mar 27, 2017
20c0c0c
Add travis yml
ariesmcrae Mar 27, 2017
9ed24ac
Update readme
ariesmcrae Mar 27, 2017
3bf5469
Update readme with valid url demo site and preview gif
ariesmcrae Mar 28, 2017
c6c5b2c
Add travis ci
ariesmcrae Mar 28, 2017
08d6a85
Add coveralls
ariesmcrae Mar 28, 2017
1de2b9b
Add coveralls to readme
ariesmcrae Mar 28, 2017
b3ddf62
Remove node 6 from being invoked by travis
ariesmcrae Mar 28, 2017
c907388
Add david-dm dependency watcher
ariesmcrae Mar 28, 2017
acda6ac
Align badges in readme
ariesmcrae Mar 28, 2017
cfece26
Update readme
ariesmcrae Mar 28, 2017
0c28fee
Upgrade outdated packages react-bootstrap-table nock redux-form
ariesmcrae Mar 30, 2017
71ac423
Add non-create-react-app to readme
ariesmcrae Mar 30, 2017
32959d8
Update credits in readme
ariesmcrae Mar 30, 2017
867e8e6
Update outdated packages react-bootstrap-table and coveralls
ariesmcrae Mar 31, 2017
cb9d469
Update outdated package react-bootstrap-table
ariesmcrae Apr 1, 2017
56b7f5d
Upgrade react-bootstrap-table
ariesmcrae Apr 2, 2017
17e719d
Upgrade package react-bootstrap-table
ariesmcrae Apr 4, 2017
1a4bc4a
Update coveralls package
ariesmcrae Jun 17, 2017
a56d5ab
Upgrade nock package
ariesmcrae Jun 17, 2017
ef6137f
Upgrade react-bootstrap-table
ariesmcrae Jun 17, 2017
b1a09a8
Upgrade enzyme package
ariesmcrae Jun 17, 2017
1cdab1d
Upgrade enzyme-to-json library
ariesmcrae Jun 17, 2017
c51e203
Upgrade redux-form
ariesmcrae Jun 17, 2017
84b4869
Upgrade rect-router-dom
ariesmcrae Jun 17, 2017
1519835
Upgrade react-bootstrap table
ariesmcrae Jun 17, 2017
7a72717
Upgrade redux
ariesmcrae Jun 17, 2017
52e565f
Upgrade redux-mock-store
ariesmcrae Jun 17, 2017
c2d2602
Upgrade react-redux
ariesmcrae Jun 17, 2017
2422460
Update README.MD
ariesmcrae Aug 15, 2017
aa701b3
Update README.md
ariesmcrae Aug 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .babelrc

This file was deleted.

31 changes: 0 additions & 31 deletions .editorconfig

This file was deleted.

72 changes: 0 additions & 72 deletions .eslintrc.yaml

This file was deleted.

23 changes: 17 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# Logs
npm-debug.log*
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# Dependency directories
node_modules
src/api/db.json
# production
/build

# misc
.DS_Store
.env
npm-debug.log*
yarn-debug.log*
yarn-error.log*

dist/
coverage/
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js

node_js:
- "7"

cache:
yarn: true
directories:
- node_modules

script:
- yarn coverage

after_script: "cat ./coverage/lcov.info | coveralls"

100 changes: 67 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,81 @@
# ReactJs CRUD Boilerplate
# ReactJs CRUD Boilerplate
[![Build Status](https://travis-ci.org/ariesmcrae/reactjs-crud-boilerplate.svg?branch=master)](https://travis-ci.org/ariesmcrae/reactjs-crud-boilerplate) [![Coverage Status](https://coveralls.io/repos/github/ariesmcrae/reactjs-crud-boilerplate/badge.svg)](https://coveralls.io/github/ariesmcrae/reactjs-crud-boilerplate)

* aka starter kit
* aka Starter project
* aka Seed
[![dependencies Status](https://david-dm.org/ariesmcrae/reactjs-crud-boilerplate/status.svg)](https://david-dm.org/ariesmcrae/reactjs-crud-boilerplate) [![devDependencies Status](https://david-dm.org/ariesmcrae/reactjs-crud-boilerplate/dev-status.svg)](https://david-dm.org/ariesmcrae/reactjs-crud-boilerplate?type=dev)

### Libraries used
## Demo (Live Interactive)
[https://d3cmu8mv5wwijw.cloudfront.net](https://d3cmu8mv5wwijw.cloudfront.net)

## Preview
<img src='https://github.com/ariesmcrae/ariesmcrae.github.com/blob/master/reactjs-crud-boilerplate.gif?raw=true' width='768' alt='Preview'>

## Prerequisite
* Nodejs v6+
* yarnpkg (optional)


## Getting Started
```sh
git clone https://github.com/ariesmcrae/reactjs-crud-boilerplate.git

cd reactjs-crud-boilerplate

yarn install
or
npm install

yarn start
or
npm start
```

Open [http://localhost:3000](http://localhost:3000)<br>


## Libraries used
* ReactJs
* Yarn
* Express server
* npm scripts
* Node Security
* Redux
* create-react-app
* React Router 4
* Bootstrap 4
* redux-form
* React Boostrap Table
* Babel
* Webpack 1.x
* ESLint, eslint-watch
* Test Framework: Mocha
* Test Assertion: Chai
* Test Helper Library: Enzyme, JSDOM
* Test Headless DOM: JSDOM - in memory DOM where tests are executed.
* ESLint
* Test Runner: Jest
* Test Assertion: Jest
* Test Helper Library: Enzyme
* Test Headless DOM: JSDOM
* react-addons-test-utils: needed by Enzyme
* WhatWG Fetch
* Mock API Data: hand rolled
* `webpack-hot-middleware` - hot module replacement when using `ExpressJs` as a server, rather than using `webpack-dev-server`.
* `eslint-plugin-react`
* JSDOM
* react-router 4
* toastr (unfortunately, I had to install jquery with it, as it wouldn't work without it)
* toastr
* jquery (needed by toastr and bootstrap 4)
* lodash
* Bootstrap 4
* Fontawesome: because Bootstrap 4 no longer suppies glyphicons
* Tether is required by Bootstrap 4
* jquery is required by Bootstrap 4
* Font Awesome: because Bootstrap 4 no longer suppies glyphicons
* Tether
* jquery
* thunk testing: nock (for mocking http calls), and redux-mock-store
* code coverage: Jest & coveralls


## Non create-react-app version
It's located in the branch **non-create-react-app**.
It uses hand crafted `Webpack 2`

```sh
git clone https://github.com/ariesmcrae/reactjs-crud-boilerplate.git

cd reactjs-crud-boilerplate

### Webpack plugins
* Dynamic HTML generation: html-webpack-plugin
* CSS minification: extract-text-webpack-plugin
* Bundle splitting.
git checkout -b non-create-react-app origin/non-create-react-app

yarn install

yarn start
```


### Credits
## Credits
This project took inspirations from :
* `javascript-development-environment` by @coryhouse
* `react-redux-react-router-es6` by @coryhouse
* `bootstrap-4-playlist` by @iamshaunjp
* [react-redux-react-router-es6](https://github.com/coryhouse/pluralsight-redux-starter) by [@coryhouse](https://twitter.com/housecor)
* [bootstrap-4-playlist](https://github.com/iamshaunjp/bootstrap-4-playlist) by [@iamshaunjp](https://github.com/iamshaunjp)
83 changes: 23 additions & 60 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "reactjs-crud-starterkit",
"description": "ReactJS CRUD Starter Kit",
"name": "reactjs-crud-boilerplate",
"description": "ReactJS CRUD Boilerplate",
"version": "0.0.2",
"main": "index.js",
"repository": "https://github.com/ariesmcrae/reactjs-crud-starter-kit.git",
"private": false,
"repository": "https://github.com/ariesmcrae/reactjs-crud-boilerplate.git",
"author": "Aries McRae <github@ariesmcrae.com>",
"license": "MIT",
"keywords": [
Expand All @@ -12,73 +12,36 @@
"Starter Project",
"Seed"
],
"scripts": {
"prestart": "babel-node scripts/startMessage.js",
"start": "npm-run-all --parallel security-check lint:watch test:watch startServerDev",
"startServerDev": "babel-node ./scripts/serverDev.js",
"security-check": "nsp check",
"lint": "esw webpack.config.* src scripts --color",
"lint:watch": "yarn lint -- --watch",
"test": "mocha --reporter spec --compilers scripts/testSetup.js --recursive test",
"test:watch": "yarn test -- --watch",
"clean-dist": "node_modules/.bin/rimraf dist && mkdir dist",
"prebuild": "npm-run-all clean-dist test lint",
"build": "babel-node scripts/build.js",
"postbuild": "babel-node scripts/serverProd.js"
},
"dependencies": {
"bootstrap": "4.0.0-alpha.6",
"font-awesome": "^4.7.0",
"jquery": "^3.2.0",
"jquery": "^3.2.1",
"lodash": "^4.17.4",
"react": "^15.4.2",
"react-bootstrap-table": "^3.4.1",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router-dom": "^4.0.0",
"redux": "^3.6.0",
"redux-form": "^6.5.0",
"react-redux": "^5.0.5",
"react-router-dom": "^4.1.1",
"redux": "^3.7.0",
"redux-form": "^6.8.0",
"redux-thunk": "^2.2.0",
"tether": "^1.4.0",
"toastr": "^2.1.2"
},
"devDependencies": {
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.4.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-latest": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-react-hmre": "^1.1.1",
"babel-register": "^6.24.0",
"chai": "^3.5.0",
"chalk": "^1.1.3",
"compression": "^1.6.2",
"css-loader": "^0.27.3",
"enzyme": "^2.7.1",
"eslint": "^3.15.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.9.0",
"eslint-watch": "^3.0.0",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"nock": "^9.0.9",
"npm-run-all": "^4.0.1",
"nsp": "^2.6.2",
"open": "^0.0.5",
"coveralls": "^2.13.1",
"enzyme": "^2.8.2",
"enzyme-to-json": "^1.5.1",
"nock": "^9.0.13",
"react-addons-test-utils": "^15.4.2",
"redux-mock-store": "^1.2.2",
"rimraf": "^2.5.4",
"style-loader": "^0.14.1",
"url-loader": "^0.5.7",
"webpack": "^2.2.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.16.1",
"webpack-md5-hash": "^0.0.5"
"react-scripts": "0.9.5",
"redux-mock-store": "^1.2.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"coverage": "react-scripts test --env=jsdom --coverage",
"eject": "react-scripts eject"
}
}
Binary file added public/favicon.ico
Binary file not shown.
Loading