Skip to content

Commit

Permalink
Remove console statements in release build
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Nov 23, 2016
1 parent d28895a commit ebe1765
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Expand Up @@ -8,5 +8,10 @@
"identifier": "m",
"moduleName": "mithril"
}]
]
],
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
}
}
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -25,6 +25,7 @@
"devDependencies": {
"babel-plugin-transform-react-jsx": "~6.8.0",
"babel-plugin-transform-react-require": "~1.0.1",
"babel-plugin-transform-remove-console": "^6.8.0",
"gulp": "~3.9.1",
"gulp-autoprefixer": "~3.1.1",
"gulp-preprocess": "~2.0.0",
Expand Down Expand Up @@ -63,7 +64,7 @@
"build-js-dev": "gulp --target='cordova' --env=env-dev.json",
"build-js-stage": "gulp --target='cordova' --env=env-stage.json",
"build-js-prod": "gulp --target='cordova' --env=env-prod.json",
"build-js-release": "gulp --mode='release' --target='cordova' --env=env-prod.json",
"build-js-release": "BABEL_ENV=production gulp --mode='release' --target='cordova' --env=env-prod.json",
"android-dev": "npm run build-js-dev && cordova run android",
"android-stage": "npm run build-js-stage && cordova run android",
"android-prod": "npm run build-js-prod && cordova run android",
Expand Down
6 changes: 6 additions & 0 deletions yarn.lock
Expand Up @@ -530,6 +530,12 @@ babel-plugin-transform-regenerator@^6.16.0:
babel-types "^6.16.0"
private "~0.1.5"

babel-plugin-transform-remove-console@^6.8.0:
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.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d"
Expand Down

0 comments on commit ebe1765

Please sign in to comment.