mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 12:15:06 +03:00
updating-vue-and-babel (#267)
* Vue updated, got rid of vue fork, babel updated * update vue-class-component * Vue-class-component updated * Vue-class-component update and usage
This commit is contained in:
parent
9e0f915d75
commit
b248b75a49
@ -1,17 +1,17 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", {
|
||||
["@babel/env", {
|
||||
"targets": {
|
||||
"browsers": ["last 3 versions", "> 2%", "ie >= 10", "Firefox >= 30", "Chrome >= 30"]
|
||||
},
|
||||
"modules": false,
|
||||
"loose": true,
|
||||
"useBuiltIns": true
|
||||
}],
|
||||
"stage-2"
|
||||
"useBuiltIns": "entry"
|
||||
}]
|
||||
],
|
||||
"plugins": [
|
||||
"transform-runtime"
|
||||
"@babel/plugin-transform-runtime",
|
||||
"@babel/plugin-syntax-dynamic-import"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
|
@ -9,7 +9,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Watch } from 'vue-property-decorator'
|
||||
import AFooter from 'client/components/AFooter.vue'
|
||||
import Toolbar from 'client/components/Toolbar.vue'
|
||||
import * as nprogress from 'nprogress'
|
||||
@ -52,7 +54,7 @@ p {
|
||||
}
|
||||
code {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-weight: 500;
|
||||
box-shadow: none;
|
||||
}
|
||||
pre code {
|
||||
|
@ -10,7 +10,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Prop, Component, Vue } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
|
||||
@Component
|
||||
export default class ALink extends Vue {
|
||||
|
@ -56,7 +56,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
import { CategoryService } from 'client/service/Category'
|
||||
|
||||
@Component
|
||||
|
@ -50,7 +50,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
@Component
|
||||
export default class AddItemDialog extends Vue {
|
||||
|
@ -111,7 +111,7 @@ export default class Categories extends Vue {
|
||||
addCategoryGroupName: string = ''
|
||||
isAddGroupDialogOpen: boolean = false
|
||||
|
||||
async asyncData () {
|
||||
async serverPrefetch () {
|
||||
return this.$store.dispatch('category/loadCategoryList')
|
||||
}
|
||||
get categories () {
|
||||
|
@ -77,7 +77,9 @@
|
||||
<script lang="ts">
|
||||
import _toKebabCase from 'lodash/kebabCase'
|
||||
import _get from 'lodash/get'
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import CategoryItem from 'client/components/CategoryItem.vue'
|
||||
import AddItemDialog from 'client/components/AddItemDialog.vue'
|
||||
import CategoryDescription from 'client/components/CategoryDescription.vue'
|
||||
@ -105,7 +107,7 @@ export default class Category extends Vue {
|
||||
}
|
||||
|
||||
// TODO handle case when category was deleted. Go back in that case
|
||||
async asyncData () {
|
||||
async serverPrefetch () {
|
||||
if (!this.categoryId) {
|
||||
return
|
||||
}
|
||||
|
@ -29,7 +29,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import _get from 'lodash/get'
|
||||
import MarkdownEditor from 'client/components/MarkdownEditor.vue'
|
||||
import conflictDialogMixin from 'client/mixins/conflictDialogMixin'
|
||||
|
@ -96,7 +96,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import { ICategoryItem } from 'client/service/CategoryItem.ts'
|
||||
import CategoryItemToolbar from 'client/components/CategoryItemToolbar.vue'
|
||||
import CategoryItemSection from 'client/components/CategoryItemSection.vue'
|
||||
|
@ -16,7 +16,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import _omit from 'lodash/omit'
|
||||
|
||||
@Component
|
||||
|
@ -25,7 +25,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
import MarkdownEditor from 'client/components/MarkdownEditor.vue'
|
||||
import CategoryItemBtn from 'client/components/CategoryItemBtn.vue'
|
||||
|
||||
|
@ -87,7 +87,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
import normalizeUrl from 'normalize-url'
|
||||
import Confirm from 'client/helpers/ConfirmDecorator'
|
||||
import CategoryItemBtn from 'client/components/CategoryItemBtn.vue'
|
||||
|
@ -92,7 +92,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
import _cloneDeep from 'lodash/cloneDeep'
|
||||
import Confirm from 'client/helpers/ConfirmDecorator'
|
||||
import CategoryItemSection from 'client/components/CategoryItemSection.vue'
|
||||
|
@ -35,7 +35,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop } from 'vue-property-decorator'
|
||||
|
||||
@Component
|
||||
export default class ConfirmDialog extends Vue {
|
||||
|
@ -8,7 +8,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
|
||||
@Component
|
||||
export default class Logo extends Vue {}
|
||||
|
@ -42,7 +42,9 @@
|
||||
|
||||
<script lang="ts">
|
||||
import 'easymde/dist/easymde.min.css'
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
|
||||
@Component
|
||||
export default class MarkdownEditor extends Vue {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
import 'reflect-metadata'
|
||||
import 'babel-polyfill'
|
||||
import '@babel/polyfill'
|
||||
import _get from 'lodash/get'
|
||||
|
||||
import { createApp } from './app'
|
||||
@ -46,9 +45,9 @@ function registerBeforeResolve () {
|
||||
: (await routeComponent()).default
|
||||
const matchedComponentsAndChildren = getComponentAndItsChildren(matchedRootComponent)
|
||||
await Promise.all(matchedComponentsAndChildren.map(component => {
|
||||
const asyncData = component.options.methods.asyncData
|
||||
if (typeof asyncData === 'function') {
|
||||
return asyncData.call({
|
||||
const serverPrefetch = component.options.serverPrefetch && component.options.serverPrefetch[0]
|
||||
if (typeof serverPrefetch === 'function') {
|
||||
return serverPrefetch.call({
|
||||
$store: store,
|
||||
$router: router,
|
||||
...props
|
||||
|
@ -66,7 +66,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { Prop, Watch } from 'vue-property-decorator'
|
||||
import ALink from 'client/components/ALink.vue'
|
||||
|
||||
@Component({
|
||||
@ -81,7 +83,7 @@ export default class SearchResults extends Vue {
|
||||
this.$store.commit('wiki/setSearchInput', this.query)
|
||||
}
|
||||
|
||||
async asyncData () {
|
||||
async serverPrefetch () {
|
||||
await this.$store.dispatch('wiki/search', this.query)
|
||||
}
|
||||
|
||||
|
3181
front/package-lock.json
generated
3181
front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,6 @@
|
||||
"dependencies": {
|
||||
"@junyiz/koa-proxy-pass": "^1.2.1",
|
||||
"axios": "^0.18.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"easymde": "^2.4.2",
|
||||
"koa": "^2.5.0",
|
||||
"koa-bodyparser": "^4.2.0",
|
||||
@ -30,24 +29,28 @@
|
||||
"normalize-url": "^4.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"vue": "^2.5.21",
|
||||
"vue-class-component": "^6.2.0",
|
||||
"vue": "^2.6.6",
|
||||
"vue-class-component": "^7.0.1",
|
||||
"vue-mixin-decorator": "^1.0.0",
|
||||
"vue-property-decorator": "^7.0.0",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-server-renderer": "https://github.com/aelve/vue-server-renderer#ead33010fb5cb064981f4f3fb632f65cf190d694",
|
||||
"vue-server-renderer": "^2.6.6",
|
||||
"vuetify": "^1.4.0",
|
||||
"vuex": "^3.0.1",
|
||||
"vuex-router-sync": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-runtime": "^7.2.0",
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@fortawesome/fontawesome-free": "^5.3.1",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.12",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.6.3",
|
||||
"@fortawesome/vue-fontawesome": "^0.1.4",
|
||||
"@types/lodash": "^4.14.116",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-loader": "^8.0.5",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
@ -72,10 +75,10 @@
|
||||
"tslint-webpack-plugin": "^1.2.2",
|
||||
"typescript": "^2.9.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"vue-loader": "^15.2.4",
|
||||
"vue-style-loader": "^4.1.0",
|
||||
"vue-template-compiler": "^2.5.21",
|
||||
"webpack": "^4.6.0",
|
||||
"vue-loader": "^15.6.2",
|
||||
"vue-style-loader": "^4.1.2",
|
||||
"vue-template-compiler": "^2.6.6",
|
||||
"webpack": "^4.29.3",
|
||||
"webpack-cli": "^3.2.1",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-merge": "^4.1.2",
|
||||
|
Loading…
Reference in New Issue
Block a user