Skip to content

Commit 9dfeaab

Browse files
committed
Transpile code using babel 🔧
1 parent 0c1785e commit 9dfeaab

4 files changed

Lines changed: 809 additions & 7 deletions

File tree

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
presets: [['@babel/preset-env']],
3+
plugins: ['@babel/plugin-proposal-object-rest-spread']
4+
};

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"yargs": "^13.2.4"
2020
},
2121
"devDependencies": {
22+
"@babel/core": "^7.4.5",
23+
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
24+
"@babel/preset-env": "^7.4.5",
2225
"email-validator": "^2.0.4",
2326
"eslint": "^5.16.0",
2427
"eslint-config-semistandard": "^13.0.0",
@@ -30,6 +33,7 @@
3033
"mocha": "6.1.4",
3134
"nixt": "^0.5.1",
3235
"rollup": "^1.15.2",
36+
"rollup-plugin-babel": "^4.3.2",
3337
"rollup-plugin-commonjs": "^10.0.0",
3438
"rollup-plugin-node-resolve": "^5.0.1",
3539
"should": "13.2.3"

rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import babel from 'rollup-plugin-babel';
12
import commonJs from 'rollup-plugin-commonjs';
23
import path from 'path';
34
import resolve from 'rollup-plugin-node-resolve';
@@ -7,7 +8,8 @@ const baseConfig = {
78
input: 'src/gravatar.js',
89
plugins: [
910
resolve({ preferBuiltins: true }),
10-
commonJs()
11+
commonJs(),
12+
babel()
1113
]
1214
};
1315

0 commit comments

Comments
 (0)