File tree Expand file tree Collapse file tree 11 files changed +55
-20
lines changed Expand file tree Collapse file tree 11 files changed +55
-20
lines changed Original file line number Diff line number Diff line change 11dist
22npm-debug.log
33example /example-react.js
4- webpack.config.template.js
4+ webpack.config.template.js
5+
6+ # Coverage directory used by tools like istanbul
7+ coverage
Original file line number Diff line number Diff line change 77.git
88.gitignore
99example /example-react.js
10- webpack.config.template.js
10+ webpack.config.template.js
11+
12+ # Coverage directory used by tools like istanbul
13+ coverage
Original file line number Diff line number Diff line change 1+ {
2+ "require" : [
3+ " /react/test/helpers/browser.js"
4+ ]
5+ }
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ services:
44 - docker
55
66before_install :
7- - ./docker/build.sh
7+ - ./docker/build.sh
8+
9+ after_success : npm run coverage
810
911language : node_js
1012node_js :
Original file line number Diff line number Diff line change 33
44# install the node modules at container build time
55ADD package.json /tmp/package.json
6- RUN cd /tmp && npm install
6+ RUN cd /tmp && npm install --silent
77RUN mkdir -p /react && cp -a /tmp/node_modules /react
88
99# Now add our project code
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # runs webpack in react container
3+
4+ NODE_ENV=${1:- local}
5+ echo " Running with NODE_ENV=$NODE_ENV "
6+
7+ rm -rf ./coverage/*
8+
9+ # run the workbench container
10+ docker run \
11+ -v $( pwd) /src:/react/src \
12+ -v $( pwd) /example:/react/example \
13+ -v $( pwd) /entrypoints:/react/entrypoints \
14+ -v $( pwd) /coverage:/react/coverage \
15+ -v $( pwd) /webpack.config.js:/react/webpack.config.js \
16+ -v $( pwd) /test:/react/test \
17+ --rm \
18+ -e NODE_ENV=$NODE_ENV \
19+ --entrypoint=/react/entrypoints/coverage.sh \
20+ -t react-json-view
Original file line number Diff line number Diff line change 44NODE_ENV=${1:- local}
55echo " Running with NODE_ENV=$NODE_ENV "
66
7+ rm -rf ./coverage/*
8+
79# run the workbench container
810docker run \
911 -v $( pwd) /src:/react/src \
1012 -v $( pwd) /example:/react/example \
1113 -v $( pwd) /entrypoints:/react/entrypoints \
14+ -v $( pwd) /coverage:/react/coverage \
1215 -v $( pwd) /webpack.config.js:/react/webpack.config.js \
1316 -v $( pwd) /test:/react/test \
1417 --rm \
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ echo Running Coverage Report
3+
4+ cd /react
5+
6+ exec npm run unit_test && npm run coverage
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # runs webpack dev server /react directory
2+ echo Running Tests
33
4- # create the build directory if it doesn't exist
5- echo Creating dist dir...
6- mkdir -p /react/dist || true
7-
8- cp /react/src/html/index.html.template /react/dist/index.html
94cd /react
105
116exec npm run unit_test
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # runs webpack dev server /react directory
3-
4- # create the build directory if it doesn't exist
5- echo Creating dist dir...
6- mkdir -p /react/dist || true
7-
8- cp /react/src/html/index.html.template /react/dist/index.html
2+ echo Running Tests
93cd /react
104
115exec npm run test:watch
You can’t perform that action at this time.
0 commit comments