Skip to content

Commit db838ee

Browse files
committed
Updated packages and prepublish scripts
1 parent 991cb18 commit db838ee

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"development": {
55
"presets": ["react-hmre"]
66
},
7+
"production": {
8+
"presets": []
9+
},
710
"test": {
811
"presets": []
912
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.env
33
npm-debug.log
4+
dist

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,18 @@ This app uses the following technologies:
4949
* [react-router](https://github.com/reactjs/react-router)
5050
* [Google Maps API](https://developers.google.com/maps/)
5151
* [google-maps-react npm](https://github.com/fullstackreact/google-maps-react)
52+
* [enzyme](https://github.com/airbnb/enzyme)
53+
* [chai](http://chaijs.com)
5254
* And much much more
5355

56+
### Running the tests
57+
58+
The application is built using tests, including the fantastic [enzyme](https://github.com/airbnb/enzyme) and [chai](http://chaijs.com) libraries. To run the tests, use the `npm` test script:
59+
60+
```shell
61+
npm run test
62+
```
63+
5464
Check out the blog post for more information on how this app was built and a complete tutorial on using React to build your own apps.
5565

5666
## Contributing

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"description": "",
55
"scripts": {
66
"start": "NODE_ENV=development ./node_modules/.bin/hjs-dev-server",
7+
"prepublish": ". ./scripts/prepublish.sh",
8+
"build": "NODE_ENV=production webpack",
9+
"publish_pages": "gh-pages -d public/",
710
"test": "NODE_ENV=test ./node_modules/karma/bin/karma start karma.conf.js",
811
"test:watch": "npm run test -- --watch"
912
},
@@ -13,6 +16,7 @@
1316
"autoprefixer": "^6.3.6",
1417
"babel-core": "^6.7.7",
1518
"babel-loader": "^6.2.4",
19+
"babel-plugin-transform-es2015-modules-umd": "^6.8.0",
1620
"babel-polyfill": "^6.7.4",
1721
"babel-preset-es2015": "^6.6.0",
1822
"babel-preset-react": "^6.5.0",
@@ -26,6 +30,7 @@
2630
"enzyme": "^2.2.0",
2731
"expect": "^1.18.0",
2832
"file-loader": "^0.8.5",
33+
"gh-pages": "^0.11.0",
2934
"hjs-webpack": "^8.1.0",
3035
"jasmine-core": "^2.4.1",
3136
"json-loader": "^0.5.4",

scripts/prepublish.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
echo "=> Compiling..."
4+
echo ""
5+
rm -rf ./dist
6+
NODE_ENV=production ./node_modules/.bin/webpack
7+
echo ""
8+
echo "=> Complete"

0 commit comments

Comments
 (0)