Skip to content

Commit

Permalink
Strip console.log and propTypes from production build
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarty committed Nov 7, 2016
1 parent 1a86f93 commit d5e30d8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"production": {
"plugins": [
"transform-remove-console",
"transform-react-remove-prop-types"
]
}
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"devDependencies": {
"babel-core": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.2.10",
"babel-plugin-transform-remove-console": "^6.8.0",
"chai": "^3.5.0",
"chai-enzyme": "^0.4.2",
"enzyme": "^2.3.0",
Expand Down
43 changes: 25 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ acorn-globals@^1.0.4:
dependencies:
acorn "^2.1.0"

acorn-jsx@^3.0.0:
acorn-jsx@^3.0.0, acorn-jsx@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
dependencies:
Expand Down Expand Up @@ -446,12 +446,6 @@ babel-plugin-transform-es2015-computed-properties@^6.5.0, babel-plugin-transform
babel-runtime "^6.0.0"
babel-template "^6.8.0"

babel-plugin-transform-es2015-constants@^6.1.4:
version "6.1.4"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-constants/-/babel-plugin-transform-es2015-constants-6.1.4.tgz#e4b8c78fb48ab98b0107f329fab6040e79c35a33"
dependencies:
babel-runtime "^5.0.0"

babel-plugin-transform-es2015-destructuring@^6.5.0, babel-plugin-transform-es2015-destructuring@^6.6.5, babel-plugin-transform-es2015-destructuring@^6.8.0, [email protected]:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.16.0.tgz#050fe0866f5d53b36062ee10cdf5bfe64f929627"
Expand Down Expand Up @@ -593,6 +587,10 @@ babel-plugin-transform-react-jsx@^6.5.0, babel-plugin-transform-react-jsx@^6.8.0
babel-plugin-syntax-jsx "^6.8.0"
babel-runtime "^6.0.0"

babel-plugin-transform-react-remove-prop-types:
version "0.2.10"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.2.10.tgz#eefd083057cccb0f9a85cb15f3a64227daf64609"

babel-plugin-transform-regenerator@^6.5.0:
version "6.16.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59"
Expand All @@ -601,6 +599,12 @@ babel-plugin-transform-regenerator@^6.5.0:
babel-types "^6.16.0"
private "~0.1.5"

babel-plugin-transform-remove-console:
version "6.8.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.0.tgz#c4162f01ee169491776e64093f4dad8d61125a90"
dependencies:
babel-runtime "^6.0.0"

babel-plugin-transform-strict-mode@^6.8.0:
version "6.11.3"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.11.3.tgz#183741325126bc7ec9cf4c0fc257d3e7ca5afd40"
Expand Down Expand Up @@ -739,12 +743,6 @@ babel-register@^6.16.0, babel-register@^6.6.0:
path-exists "^1.0.0"
source-map-support "^0.4.2"

babel-runtime@^5.0.0:
version "5.8.38"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-5.8.38.tgz#1c0b02eb63312f5f087ff20450827b425c9d4c19"
dependencies:
core-js "^1.0.0"

babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
version "6.11.6"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.11.6.tgz#6db707fef2d49c49bfa3cb64efdb436b518b8222"
Expand Down Expand Up @@ -1880,9 +1878,12 @@ escope@^3.6.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"

eslint-plugin-react@^4.2.3:
version "4.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-4.3.0.tgz#c79aac8069d62de27887c13b8298d592088de378"
eslint-plugin-react@^6.5.0:
version "6.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.6.0.tgz#91ceecefa8a22d8f5d23ef9a839516a7d9fa63a1"
dependencies:
doctrine "^1.2.2"
jsx-ast-utils "^1.3.3"

eslint@^2.5.3:
version "2.13.1"
Expand Down Expand Up @@ -3073,6 +3074,13 @@ jstransform@^11.0.3:
object-assign "^2.0.0"
source-map "^0.4.2"

jsx-ast-utils@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.3.tgz#ccfdbe0320ba03f7a1fc4e67ceaf7e2cc0169721"
dependencies:
acorn-jsx "^3.0.1"
object-assign "^4.1.0"

keymirror@=0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/keymirror/-/keymirror-0.1.1.tgz#918889ea13f8d0a42e7c557250eee713adc95c35"
Expand Down Expand Up @@ -3289,8 +3297,7 @@ lru-cache@2:
url "^0.11.0"
xml2js "^0.4.16"

"magnet-scanner-android@github:mozilla-magnet/magnet-scanner-android#v4.0.0", mozilla-magnet/magnet-scanner-android#v4.0.0:
name magnet-scanner-android
magnet-scanner-android@mozilla-magnet/magnet-scanner-android#v4.0.0:
version "4.0.0"
resolved "https://codeload.github.com/mozilla-magnet/magnet-scanner-android/tar.gz/62886b042e4b25c17de8be65717081c8c9ef03d4"

Expand Down

0 comments on commit d5e30d8

Please sign in to comment.