Skip to content

Commit 399e341

Browse files
committed
build: Update build to support jest and esm imports with jest
1 parent 9c1167f commit 399e341

File tree

3 files changed

+2119
-45
lines changed

3 files changed

+2119
-45
lines changed

.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"node": "current"
8+
}
9+
}
10+
]
11+
]
12+
}

package.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"scripts": {
1313
"build": "microbundle",
1414
"dev": "microbundle watch",
15+
"test": "jest",
1516
"semantic-release": "semantic-release",
1617
"travis-deploy-once": "travis-deploy-once"
1718
},
@@ -26,19 +27,35 @@
2627
"@semantic-release/npm",
2728
"@semantic-release/git"
2829
],
29-
"publish": ["@semantic-release/github", "@semantic-release/npm"]
30+
"publish": [
31+
"@semantic-release/github",
32+
"@semantic-release/npm"
33+
]
3034
},
3135
"devDependencies": {
36+
"@babel/core": "^7.0.0-beta.47",
37+
"@babel/preset-env": "^7.0.0-beta.47",
3238
"@semantic-release/changelog": "^2.0.2",
3339
"@semantic-release/git": "^5.0.0",
40+
"@vue/test-utils": "^1.0.0-beta.16",
41+
"babel-core": "^7.0.0-0",
42+
"babel-jest": "^22.4.4",
3443
"cz-conventional-changelog": "^2.1.0",
44+
"jest": "^22.4.4",
3545
"microbundle": "^0.4.4",
3646
"semantic-release": "^15.5.0",
37-
"travis-deploy-once": "^5.0.0"
47+
"travis-deploy-once": "^5.0.0",
48+
"vue": "^2.5.16",
49+
"vue-template-compiler": "^2.5.16"
3850
},
3951
"config": {
4052
"commitizen": {
4153
"path": "./node_modules/cz-conventional-changelog"
4254
}
55+
},
56+
"jest": {
57+
"transform": {
58+
"^.+\\.js$": "babel-jest"
59+
}
4360
}
4461
}

0 commit comments

Comments
 (0)