Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Strip prop types for production builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
garetht committed Aug 6, 2017
1 parent 1dcfb89 commit 1596a17
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"presets": ["es2015", "flow", "react"],
"plugins": ["transform-class-properties", "transform-object-rest-spread"]
"plugins": ["transform-class-properties", "transform-object-rest-spread"],
"env": {
"production": {
"plugins": ["transform-react-remove-prop-types"]
}
}
}
2 changes: 1 addition & 1 deletion config/travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi;

if [ "$BROWSER" = 1 ]; then
npm install -g cypress-cli http-server
npm install react react-dom create-react-class gulp
npm install react react-dom create-react-class prop-types gulp
gulp examples
http-server --silent &
cypress run --record
Expand Down
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"babel-jest": "20.0.3",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.8",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babelify": "7.3.0",
Expand Down

0 comments on commit 1596a17

Please sign in to comment.