Merge branch 'upgrade-babel' into 'develop'
Upgrade babel to v7 Closes #733 See merge request pleroma/pleroma-fe!1029
This commit is contained in:
commit
766a674a48
6 changed files with 911 additions and 562 deletions
4
.babelrc
4
.babelrc
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"presets": ["es2015", "stage-2", "env"],
|
"presets": ["@babel/preset-env"],
|
||||||
"plugins": ["transform-runtime", "lodash", "transform-vue-jsx"],
|
"plugins": ["@babel/plugin-transform-runtime", "lodash", "@vue/babel-plugin-transform-vue-jsx"],
|
||||||
"comments": false
|
"comments": false
|
||||||
}
|
}
|
||||||
|
|
22
package.json
22
package.json
|
@ -15,9 +15,8 @@
|
||||||
"lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs"
|
"lint-fix": "eslint --fix --ext .js,.vue src test/unit/specs test/e2e/specs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.7.6",
|
||||||
"@chenfengyuan/vue-qrcode": "^1.0.0",
|
"@chenfengyuan/vue-qrcode": "^1.0.0",
|
||||||
"babel-plugin-add-module-exports": "^0.2.1",
|
|
||||||
"babel-plugin-lodash": "^3.2.11",
|
|
||||||
"body-scroll-lock": "^2.6.4",
|
"body-scroll-lock": "^2.6.4",
|
||||||
"chromatism": "^3.0.0",
|
"chromatism": "^3.0.0",
|
||||||
"cropperjs": "^1.4.3",
|
"cropperjs": "^1.4.3",
|
||||||
|
@ -40,20 +39,17 @@
|
||||||
"whatwg-fetch": "^2.0.3"
|
"whatwg-fetch": "^2.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/polyfill": "^7.0.0",
|
"@babel/core": "^7.7.5",
|
||||||
|
"@babel/plugin-transform-runtime": "^7.7.6",
|
||||||
|
"@babel/preset-env": "^7.7.6",
|
||||||
|
"@babel/register": "^7.7.4",
|
||||||
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
|
||||||
|
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2",
|
||||||
"@vue/test-utils": "^1.0.0-beta.26",
|
"@vue/test-utils": "^1.0.0-beta.26",
|
||||||
"autoprefixer": "^6.4.0",
|
"autoprefixer": "^6.4.0",
|
||||||
"babel-core": "^6.0.0",
|
|
||||||
"babel-eslint": "^7.0.0",
|
"babel-eslint": "^7.0.0",
|
||||||
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
"babel-loader": "^8.0.6",
|
||||||
"babel-loader": "^7.0.0",
|
"babel-plugin-lodash": "^3.3.4",
|
||||||
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
||||||
"babel-plugin-transform-runtime": "^6.0.0",
|
|
||||||
"babel-plugin-transform-vue-jsx": "3",
|
|
||||||
"babel-preset-env": "^1.7.0",
|
|
||||||
"babel-preset-es2015": "^6.0.0",
|
|
||||||
"babel-preset-stage-2": "^6.0.0",
|
|
||||||
"babel-register": "^6.0.0",
|
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"chromedriver": "^2.21.2",
|
"chromedriver": "^2.21.2",
|
||||||
|
|
|
@ -65,7 +65,7 @@ const withLoadMore = ({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render (createElement) {
|
render (h) {
|
||||||
const props = {
|
const props = {
|
||||||
props: {
|
props: {
|
||||||
...this.$props,
|
...this.$props,
|
||||||
|
@ -74,7 +74,7 @@ const withLoadMore = ({
|
||||||
on: this.$listeners,
|
on: this.$listeners,
|
||||||
scopedSlots: this.$scopedSlots
|
scopedSlots: this.$scopedSlots
|
||||||
}
|
}
|
||||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
const children = Object.entries(this.$slots).map(([key, value]) => h('template', { slot: key }, value))
|
||||||
return (
|
return (
|
||||||
<div class="with-load-more">
|
<div class="with-load-more">
|
||||||
<WrappedComponent {...props}>
|
<WrappedComponent {...props}>
|
||||||
|
|
|
@ -49,7 +49,7 @@ const withSubscription = ({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render (createElement) {
|
render (h) {
|
||||||
if (!this.error && !this.loading) {
|
if (!this.error && !this.loading) {
|
||||||
const props = {
|
const props = {
|
||||||
props: {
|
props: {
|
||||||
|
@ -59,7 +59,7 @@ const withSubscription = ({
|
||||||
on: this.$listeners,
|
on: this.$listeners,
|
||||||
scopedSlots: this.$scopedSlots
|
scopedSlots: this.$scopedSlots
|
||||||
}
|
}
|
||||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
const children = Object.entries(this.$slots).map(([key, value]) => h('template', { slot: key }, value))
|
||||||
return (
|
return (
|
||||||
<div class="with-subscription">
|
<div class="with-subscription">
|
||||||
<WrappedComponent {...props}>
|
<WrappedComponent {...props}>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require('babel-register')
|
require('@babel/register')
|
||||||
var config = require('../../config')
|
var config = require('../../config')
|
||||||
|
|
||||||
// http://nightwatchjs.org/guide#settings-file
|
// http://nightwatchjs.org/guide#settings-file
|
||||||
|
|
Loading…
Reference in a new issue