Skip to content

Commit c04eb6a

Browse files
committed
♻️ Upgrade dependencies and fix some code style
1 parent a0d2aa2 commit c04eb6a

File tree

8 files changed

+3965
-4309
lines changed

8 files changed

+3965
-4309
lines changed

bin/dev-server.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"scss-styles"
3131
],
3232
"scripts": {
33-
"start": "cross-env NODE_ENV=development node bin/dev-server.js",
33+
"start": "cross-env NODE_ENV=development node_modules/.bin/webpack-dev-server",
3434
"build": "cross-env NODE_ENV=production webpack",
3535
"serve": "cross-env NODE_ENV=production node bin/spa-server.js",
3636
"lint-js": "eslint --ext .js,.vue src",
@@ -53,51 +53,51 @@
5353
}
5454
},
5555
"dependencies": {
56-
"axios": "^0.18.0",
57-
"vue": "^2.5.16",
58-
"vue-analytics": "^5.12.2",
56+
"axios": "^0.19.0",
57+
"vue": "^2.6.10",
58+
"vue-analytics": "^5.17.0",
5959
"vue-cookie": "^1.1.4",
60-
"vue-router": "^3.0.1",
61-
"vuex": "^3.0.1"
60+
"vue-router": "^3.0.6",
61+
"vuex": "^3.1.1"
6262
},
6363
"devDependencies": {
64-
"@babel/core": "^7.0.0-beta.51",
65-
"@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.51",
66-
"@babel/preset-env": "^7.0.0-beta.51",
64+
"@babel/core": "^7.4.5",
65+
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
66+
"@babel/preset-env": "^7.4.5",
6767
"@vue/test-utils": "^1.0.0-beta.29",
6868
"babel-core": "^7.0.0-0",
69-
"babel-jest": "^23.2.0",
70-
"babel-loader": "^8.0.0-beta",
69+
"babel-jest": "^24.8.0",
70+
"babel-loader": "^8.0.6",
7171
"babel-preset-env": "^1.7.0",
72-
"copy-webpack-plugin": "^4.5.2",
72+
"copy-webpack-plugin": "^5.0.3",
7373
"cross-env": "^5.2.0",
74-
"css-loader": "^0.28.11",
75-
"eslint": "^4",
76-
"eslint-config-prettier": "^2.9.0",
77-
"eslint-plugin-prettier": "^2.6.2",
78-
"eslint-plugin-vue": "^4.5.0",
79-
"express": "^4.16.3",
80-
"file-loader": "^1.1.11",
74+
"css-loader": "^2.1.1",
75+
"eslint": "^5.16.0",
76+
"eslint-config-prettier": "^4.3.0",
77+
"eslint-plugin-prettier": "^3.1.0",
78+
"eslint-plugin-vue": "^5.2.2",
79+
"express": "^4.17.1",
80+
"file-loader": "^3.0.1",
8181
"html-webpack-plugin": "^3.2.0",
82-
"jest": "^23.2.0",
83-
"mini-css-extract-plugin": "^0.4.1",
84-
"node-sass": "^4.9.0",
85-
"opn": "^5.3.0",
86-
"optimize-css-assets-webpack-plugin": "^4.0.3",
87-
"regenerator-runtime": "^0.12.0",
88-
"resolve-url-loader": "^2.3.0",
89-
"sass-lint": "^1.12.1",
90-
"sass-loader": "^7.0.3",
91-
"style-loader": "^0.21.0",
92-
"sugarss": "^1.0.1",
93-
"uglifyjs-webpack-plugin": "^1.2.5",
94-
"url-loader": "^1.0.1",
95-
"vue-eslint-parser": "^2.0.3",
96-
"vue-jest": "^2.6.0",
97-
"vue-loader": "^15.0.0-beta",
98-
"vue-template-compiler": "^2.5.16",
99-
"webpack": "^4.14.0",
100-
"webpack-cli": "^3.0.8",
101-
"webpack-serve": "^1.0.4"
82+
"jest": "^24.8.0",
83+
"mini-css-extract-plugin": "^0.7.0",
84+
"node-sass": "^4.12.0",
85+
"open": "^6.3.0",
86+
"optimize-css-assets-webpack-plugin": "^5.0.1",
87+
"regenerator-runtime": "^0.13.2",
88+
"resolve-url-loader": "^3.1.0",
89+
"sass-lint": "^1.13.1",
90+
"sass-loader": "^7.1.0",
91+
"style-loader": "^0.23.1",
92+
"sugarss": "^2.0.0",
93+
"uglifyjs-webpack-plugin": "^2.1.3",
94+
"url-loader": "^1.1.2",
95+
"vue-eslint-parser": "^6.0.4",
96+
"vue-jest": "^3.0.4",
97+
"vue-loader": "^15.7.0",
98+
"vue-template-compiler": "^2.6.10",
99+
"webpack": "^4.32.2",
100+
"webpack-cli": "^3.3.2",
101+
"webpack-dev-server": "^3.5.0"
102102
}
103103
}

src/components/App/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<template>
22
<div class="app">
33
<header>
4-
<h1 class="title">{{ title }}</h1>
4+
<h1 class="title">
5+
{{ title }}
6+
</h1>
57
<nav>
68
<ul>
79
<li>
8-
<router-link :to="{name: 'Home' }">Home</router-link>
10+
<router-link :to="{name: 'Home' }">
11+
Home
12+
</router-link>
913
</li>
1014
</ul>
1115
</nav>

src/components/Index/Articles.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { shallow } from '@vue/test-utils';
1+
import { shallowMount } from '@vue/test-utils';
22
import Articles from './Articles.vue';
33

44
describe('Articles.vue', () => {
@@ -13,7 +13,7 @@ describe('Articles.vue', () => {
1313
},
1414
];
1515
it('Displays all articles', () => {
16-
const wrapper = shallow(Articles, {
16+
const wrapper = shallowMount(Articles, {
1717
propsData: { articles },
1818
});
1919
expect(wrapper.findAll('li')).toHaveLength(articles.length);

src/components/Index/Articles.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
<ul class="list">
44
<li
55
v-for="(article, index) in articles"
6-
:key="index">
7-
<h2 class="list__title">{{ article.title }}</h2>
8-
<p class="list__content">{{ article.body }}</p>
6+
:key="index"
7+
>
8+
<h2 class="list__title">
9+
{{ article.title }}
10+
</h2>
11+
<p class="list__content">
12+
{{ article.body }}
13+
</p>
914
</li>
1015
</ul>
1116
</div>

src/main.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import router from './router';
66
import App from '@Component/App/App.vue';
77
import VuexStoreConfig from './vuex/store';
88

9-
import {
10-
enableAnalytics,
11-
analyticsKey,
12-
disableAnalyticsInDebug,
13-
} from './config';
9+
import { enableAnalytics, analyticsKey, disableAnalyticsInDebug } from './config';
1410

1511
if (enableAnalytics) {
1612
const VueAnalytics = require('vue-analytics').default;
@@ -19,8 +15,7 @@ if (enableAnalytics) {
1915
router,
2016
debug: {
2117
enabled: process.env.NODE_ENV !== 'production',
22-
sendHitTask:
23-
process.env.NODE_ENV === 'production' || !disableAnalyticsInDebug,
18+
sendHitTask: process.env.NODE_ENV === 'production' || !disableAnalyticsInDebug,
2419
},
2520
});
2621
}

src/views/Index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
22
<div class="page-content">
3-
<h2 class="page-title">{{ title }}</h2>
3+
<h2 class="page-title">
4+
{{ title }}
5+
</h2>
46
<articles :articles="articles" />
57
</div>
68
</template>

0 commit comments

Comments
 (0)