Skip to content

Commit da6c49f

Browse files
committed
Swap create-react-app for custom build
1 parent 179de79 commit da6c49f

166 files changed

Lines changed: 35146 additions & 2811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets":[
3+
"es2015",
4+
"react"
5+
]
6+
}

.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"parser": "babel-eslint",
3+
"rules": {
4+
}
5+
}

README.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
1-
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
1+
BB React App Boilerplate
2+
===================
3+
This boilerplate is the basic setup for a react app, built with npm and webpack, you can build out a dev version and a production version.
24

3-
Below you will find some information on how to perform common tasks.<br>
4-
You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
5+
----------
56

67

7-
Also using react-router-dom:
8-
https://reacttraining.com/react-router/web/
8+
How to build
9+
-------------
910

11+
1) **'npm install'**
1012

11-
### `npm install`
13+
2) **'npm run dev'** (this will build out the app, inc. styles and move images and plugins into the dist folder), you will then be able to visit localhost:8080 to see the site
1214

13-
Installs required modules
15+
To build the prod version just run:
16+
**'npm run build'**
1417

15-
### `npm start`
18+
If you want to then test your prod app you can run a little node express server by:
19+
**'node server'** or **'npm run serve'**
20+
you will then be able to visit localhost:8080 to see the site
1621

17-
Runs the app in the development mode.
1822

19-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
23+
Visual Regression Testing
24+
-------
25+
We use backstopjs on this project for visual testing.
26+
There is already a backstop_data folder which holds the reference images, the test images are excluded from git
2027

28+
To re-add the base images for testing against (shouldn't have to do this often/at all) run:
29+
'**gulp backstop-ref**'
2130

22-
### `gulp` to run the sass build alongside the react build
23-
24-
Builds the app for production to the `build` folder.
25-
26-
It correctly bundles React in production mode and optimizes the build for the best performance.
27-
28-
The build is minified and the filenames include the hashes.
31+
To run a test go to your commandline and type '**gulp backstop-test**'
32+
This will run the tests against the reference images and when finished it will open up a browser window to show the results. If there are differences you can either fix the css and run again or if the changes are intended go back to your commandline and run '**backstop approve**' which will then overwrite the ref images with the updated test images.
2933

3034

35+
React Unit Testing
36+
-------
37+
We use Jest and Enzme to run react unit tests
3138

39+
To run the test run:
40+
'**npm test**'
3241

42+
To check the coverage of the tests run:
43+
'**test:coverage**'

_styles/_03-elements/icons.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

_styles/_05-components/header.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

_styles/_05-components/modal.scss

Lines changed: 0 additions & 64 deletions
This file was deleted.

_styles/_05-components/result.scss

Lines changed: 0 additions & 125 deletions
This file was deleted.

_styles/_05-components/results.scss

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)