Skip to content

Commit

Permalink
workflow: upgraded to babel 7 (vuejs#8948)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikr01 authored and yyx990803 committed Oct 23, 2018
1 parent 93d1f5f commit 12e8efc
Show file tree
Hide file tree
Showing 10 changed files with 2,297 additions and 522 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

23 changes: 23 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const babelPresetFlowVue = {
plugins: [
require('@babel/plugin-proposal-class-properties'),
// require('@babel/plugin-syntax-flow'), // not needed, included in transform-flow-strip-types
require('@babel/plugin-transform-flow-strip-types')
]
}

module.exports = {
presets: [
require('@babel/preset-env'),
// require('babel-preset-flow-vue')
babelPresetFlowVue
],
plugins: [
require('babel-plugin-transform-vue-jsx'),
require('@babel/plugin-syntax-dynamic-import')
],
ignore: [
'dist/*.js',
'packages/**/*.js'
]
}
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"test:unit": "karma start test/unit/karma.unit.config.js",
"test:cover": "karma start test/unit/karma.cover.config.js",
"test:e2e": "npm run build -- web-full-prod,web-server-basic-renderer && node test/e2e/runner.js",
"test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.json",
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
"test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.js",
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.js",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
"test:types": "tsc -p ./types/test/tsconfig.json",
"lint": "eslint --fix src scripts test",
Expand Down Expand Up @@ -67,18 +67,21 @@
},
"homepage": "https://github.com/vuejs/vue#readme",
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-jsx": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"@types/node": "^8.0.33",
"@types/webpack": "^3.0.13",
"acorn": "^5.2.1",
"babel-core": "^6.25.0",
"babel-eslint": "^8.0.3",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^7.0.0",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.4.3",
"babel-preset-es2015": "^6.24.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^8.0.4",
"babel-plugin-istanbul": "^5.1.0",
"babel-plugin-transform-vue-jsx": "^4.0.1",
"babel-preset-flow-vue": "^1.0.0",
"buble": "^0.19.3",
"chalk": "^2.3.0",
Expand Down Expand Up @@ -125,7 +128,7 @@
"resolve": "^1.3.3",
"rollup": "^0.54.1",
"rollup-plugin-alias": "^1.3.1",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-commonjs": "^8.0.0",
"rollup-plugin-flow-no-whitespace": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/ssr/fixtures/async-foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import './test.css'
import font from './test.woff2'
import image from './test.png'

module.exports = {
export default {
beforeCreate () {
this.$vnode.ssrContext._registeredComponents.add('__MODULE_ID__')
},
Expand Down
2 changes: 1 addition & 1 deletion test/ssr/fixtures/split.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default context => {
// simulate router.onReady
Foo().then(comp => {
// resolve now to make the render sync
Foo.resolved = Vue.extend(comp)
Foo.resolved = Vue.extend(comp.default)
resolve(vm)
})
})
Expand Down
9 changes: 9 additions & 0 deletions test/ssr/jasmine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
spec_dir: 'test/ssr',
spec_files: [
'*.spec.js'
],
helpers: [
require.resolve('@babel/register')
]
}
9 changes: 0 additions & 9 deletions test/ssr/jasmine.json

This file was deleted.

9 changes: 9 additions & 0 deletions test/weex/jasmine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
spec_dir: 'test/weex',
spec_files: [
'**/*[sS]pec.js'
],
helpers: [
require.resolve('@babel/register')
]
}
9 changes: 0 additions & 9 deletions test/weex/jasmine.json

This file was deleted.

Loading

0 comments on commit 12e8efc

Please sign in to comment.