Skip to content

Commit 5425fce

Browse files
authored
Fix: babel runtime (#1)
* Chore: remove babel-runtime and update to babel 7 * Chore: update dependencies, npm to yarn and husky prepush hook * Test: lib to src
1 parent f71afc7 commit 5425fce

File tree

4 files changed

+1592
-1460
lines changed

4 files changed

+1592
-1460
lines changed

.babelrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"presets": [
3-
"env"
4-
],
5-
"plugins": ["transform-runtime"]
3+
"@babel/env"
4+
]
65
}

package.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
"license": "MIT",
99
"private": false,
1010
"scripts": {
11-
"pretest": "npm run build && npm run lint",
11+
"pretest": "yarn run build && yarn run lint",
1212
"lint": "eslint src",
1313
"test": "jest --coverage",
1414
"build": "babel src --out-dir lib",
15-
"prepublish": "npm run build"
15+
"prepush": "yarn run test",
16+
"prepare": "yarn run build"
1617
},
1718
"keywords": [
1819
"string",
@@ -33,12 +34,16 @@
3334
]
3435
},
3536
"devDependencies": {
36-
"babel-cli": "^6.26.0",
37-
"babel-plugin-transform-runtime": "^6.23.0",
38-
"babel-preset-env": "^1.6.1",
39-
"eslint": "^4.19.1",
40-
"eslint-config-airbnb-base": "^12.1.0",
41-
"eslint-plugin-import": "^2.9.0",
42-
"jest": "^22.4.3"
37+
"@babel/cli": "^7.0.0",
38+
"@babel/core": "^7.0.0",
39+
"@babel/preset-env": "^7.0.0",
40+
"babel-core": "^7.0.0-0",
41+
"babel-jest": "^23.4.2",
42+
"eslint": "^5.5.0",
43+
"eslint-config-airbnb-base": "^13.1.0",
44+
"eslint-plugin-import": "^2.14.0",
45+
"husky": "^0.14.3",
46+
"jest": "^23.5.0",
47+
"regenerator-runtime": "^0.12.1"
4348
}
4449
}

test/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import converter, { convertStringToNumber } from '../lib';
1+
import converter, { convertStringToNumber } from '../src';
22

33
test('default export | convert string "2" to integer 2', () => {
44
const input = '2';

0 commit comments

Comments
 (0)