Skip to content

Commit

Permalink
Merge pull request dozoisch#59 from anajavi/master
Browse files Browse the repository at this point in the history
Add es2015 module build
  • Loading branch information
dozoisch authored Mar 25, 2018
2 parents 9b8c7b7 + 98a0197 commit 4920312
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
22 changes: 17 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"presets": [
"react",
[ "es2015", { "loose": true } ]
],
"plugins": [ "transform-runtime", "transform-object-rest-spread" ]

"env": {
"development": {
"presets": [
"react",
[ "es2015", { "loose": true } ]
],
"plugins": [ "transform-runtime", "transform-object-rest-spread" ]
},
"es": {
"presets": [
"react",
[ "es2015", { "loose": true, "modules": false } ]
],
"plugins": [ "transform-runtime", "transform-object-rest-spread" ],
}
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"version": "0.10.0",
"description": "React Component Wrapper for Google reCAPTCHA",
"main": "lib/recaptcha-wrapper.js",
"module": "lib/es/recaptcha-wrapper.js",
"directories": {
"lib": "lib/"
},
"scripts": {
"build": "rm -rf lib && babel src --out-dir lib",
"build": "rm -rf lib && npm run build:cjs && npm run build:es",
"build:cjs": "babel src --out-dir lib",
"build:es": "BABEL_ENV=es babel src --out-dir lib/es",
"lint": "eslint ./",
"lint:fix": "eslint ./ --fix",
"test": "karma start --single-run",
Expand Down

0 comments on commit 4920312

Please sign in to comment.