Skip to content

Commit 35510bf

Browse files
committed
add decorators to Footer.vue and Navbar.vue, add base url in axios, edit README.md
1 parent 1ccb238 commit 35510bf

File tree

9 files changed

+47
-75
lines changed

9 files changed

+47
-75
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ For more information on how to this works with other frontends/backends, head ov
2424
* [x] Project setup
2525
* [x] Add pages and layouts
2626
* [x] Setup store and axios
27+
* [ ] Setup vuex store modules
2728
* [ ] Fetch global articles
2829
* [ ] Fetch tags
2930
* [ ] Pagination

components/Footer.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<script lang="ts">
1414
import { Vue, Component } from 'nuxt-property-decorator';
1515
16+
@Component
1617
export default class Footer extends Vue { }
1718
</script>

components/Navbar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
<script lang="ts">
2929
import { Vue, Component } from 'nuxt-property-decorator';
3030
31+
@Component
3132
export default class Header extends Vue { }
3233
</script>

nuxt.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export default {
4141
*/
4242
modules: [
4343
// Doc: https://axios.nuxtjs.org/usage
44-
'@nuxtjs/axios',
4544
],
4645
/*
4746
** Axios module configuration

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
"generate": "nuxt generate"
1212
},
1313
"dependencies": {
14-
"@nuxtjs/axios": "^5.3.6",
14+
"axios": "^0.19.0",
1515
"cross-env": "^5.2.0",
1616
"nuxt": "^2.4.0",
1717
"nuxt-property-decorator": "^2.3.0",
18-
"ts-node": "^8.1.0"
18+
"ts-node": "^8.1.0",
19+
"vuex-class": "^0.3.2"
1920
},
2021
"devDependencies": {
2122
"@nuxt/typescript": "^2.7.1",

pages/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@
8585
</template>
8686

8787

88-

plugins/axios.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import axios from 'axios'
2+
3+
export const APIurl = axios.create({
4+
baseURL: 'https://conduit.productionready.io/api'
5+
})
6+
7+
export async function fetchArticles() {
8+
const res = await APIurl.get('/articles')
9+
return res.data
10+
}

store/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
export const state = () => ({ })
1+
export const state = () => ({})
22

3-
export const gettes = () => ({ })
3+
export const getters = {}
44

5-
export const mutations = () => ({ })
65

7-
export const actions = () => ({ })
6+
export const mutations = {}
7+
8+
9+
export const actions = {}

yarn.lock

Lines changed: 25 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -955,24 +955,6 @@
955955
webpack-node-externals "^1.7.2"
956956
webpackbar "^3.2.0"
957957

958-
"@nuxtjs/axios@^5.3.6":
959-
version "5.5.1"
960-
resolved "https://registry.yarnpkg.com/@nuxtjs/axios/-/axios-5.5.1.tgz#e0eeddcbbec4f04bd705b96afd05071340169b36"
961-
integrity sha512-MRZGuXM13D7tFf01D6LJZ7jYxIxD+poRfqgpVHbXIA/AN2FEWvVx9Sv3VlwniEM50+NqzcHHEGv4k2s2ZSSE6g==
962-
dependencies:
963-
"@nuxtjs/proxy" "^1.3.3"
964-
axios "^0.18.0"
965-
axios-retry "^3.1.2"
966-
consola "^2.6.2"
967-
968-
"@nuxtjs/proxy@^1.3.3":
969-
version "1.3.3"
970-
resolved "https://registry.yarnpkg.com/@nuxtjs/proxy/-/proxy-1.3.3.tgz#3de3d9f073e8e57167168100940be2a824a220e0"
971-
integrity sha512-ykpCUdOqPOH79mQG30QfWZmbRD8yjTD+TTSBbwow5GkROUQEtXw+HE+q6i+YFpuChvgJNbwVrXdZ3YmfXbZtTw==
972-
dependencies:
973-
consola "^2.5.6"
974-
http-proxy-middleware "^0.19.1"
975-
976958
"@nuxtjs/youch@^4.2.3":
977959
version "4.2.3"
978960
resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-4.2.3.tgz#36f8b22df5a0efaa81373109851e1d857aca6bed"
@@ -1685,20 +1667,13 @@ autoprefixer@^9.4.9:
16851667
postcss "^7.0.14"
16861668
postcss-value-parser "^3.3.1"
16871669

1688-
axios-retry@^3.1.2:
1689-
version "3.1.2"
1690-
resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.1.2.tgz#4f4dcbefb0b434e22b72bd5e28a027d77b8a3458"
1691-
integrity sha512-+X0mtJ3S0mmia1kTVi1eA3DAC+oWnT2A29g3CpkzcBPMT6vJm+hn/WiV9wPt/KXLHVmg5zev9mWqkPx7bHMovg==
1670+
axios@^0.19.0:
1671+
version "0.19.0"
1672+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8"
1673+
integrity sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==
16921674
dependencies:
1693-
is-retry-allowed "^1.1.0"
1694-
1695-
axios@^0.18.0:
1696-
version "0.18.0"
1697-
resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102"
1698-
integrity sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=
1699-
dependencies:
1700-
follow-redirects "^1.3.0"
1701-
is-buffer "^1.1.5"
1675+
follow-redirects "1.5.10"
1676+
is-buffer "^2.0.2"
17021677

17031678
babel-code-frame@^6.22.0:
17041679
version "6.26.0"
@@ -2326,7 +2301,7 @@ connect@^3.6.6:
23262301
parseurl "~1.3.3"
23272302
utils-merge "1.0.1"
23282303

2329-
consola@^2.3.0, consola@^2.5.6, consola@^2.6.0, consola@^2.6.1, consola@^2.6.2:
2304+
consola@^2.3.0, consola@^2.5.6, consola@^2.6.0, consola@^2.6.1:
23302305
version "2.6.2"
23312306
resolved "https://registry.yarnpkg.com/consola/-/consola-2.6.2.tgz#4c1238814bb80688b19f0db97123508889577752"
23322307
integrity sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg==
@@ -2763,6 +2738,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
27632738
dependencies:
27642739
ms "2.0.0"
27652740

2741+
debug@=3.1.0:
2742+
version "3.1.0"
2743+
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
2744+
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
2745+
dependencies:
2746+
ms "2.0.0"
2747+
27662748
debug@^3.1.0, debug@^3.2.6:
27672749
version "3.2.6"
27682750
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@@ -3114,11 +3096,6 @@ etag@^1.8.1, etag@~1.8.1:
31143096
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
31153097
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
31163098

3117-
eventemitter3@^3.0.0:
3118-
version "3.1.2"
3119-
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
3120-
integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==
3121-
31223099
events@^3.0.0:
31233100
version "3.0.0"
31243101
resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"
@@ -3350,12 +3327,12 @@ flush-write-stream@^1.0.0:
33503327
inherits "^2.0.3"
33513328
readable-stream "^2.3.6"
33523329

3353-
follow-redirects@^1.0.0, follow-redirects@^1.3.0:
3354-
version "1.7.0"
3355-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76"
3356-
integrity sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==
3330+
follow-redirects@1.5.10:
3331+
version "1.5.10"
3332+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
3333+
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
33573334
dependencies:
3358-
debug "^3.2.6"
3335+
debug "=3.1.0"
33593336

33603337
for-in@^1.0.2:
33613338
version "1.0.2"
@@ -3770,25 +3747,6 @@ http-errors@1.7.2, http-errors@~1.7.2:
37703747
statuses ">= 1.5.0 < 2"
37713748
toidentifier "1.0.0"
37723749

3773-
http-proxy-middleware@^0.19.1:
3774-
version "0.19.1"
3775-
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
3776-
integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
3777-
dependencies:
3778-
http-proxy "^1.17.0"
3779-
is-glob "^4.0.0"
3780-
lodash "^4.17.11"
3781-
micromatch "^3.1.10"
3782-
3783-
http-proxy@^1.17.0:
3784-
version "1.17.0"
3785-
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
3786-
integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==
3787-
dependencies:
3788-
eventemitter3 "^3.0.0"
3789-
follow-redirects "^1.0.0"
3790-
requires-port "^1.0.0"
3791-
37923750
https-browserify@^1.0.0:
37933751
version "1.0.0"
37943752
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
@@ -3970,6 +3928,11 @@ is-buffer@^1.1.5:
39703928
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
39713929
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
39723930

3931+
is-buffer@^2.0.2:
3932+
version "2.0.3"
3933+
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725"
3934+
integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==
3935+
39733936
is-callable@^1.1.4:
39743937
version "1.1.4"
39753938
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
@@ -4150,7 +4113,7 @@ is-resolvable@^1.0.0:
41504113
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
41514114
integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
41524115

4153-
is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0:
4116+
is-retry-allowed@^1.0.0:
41544117
version "1.1.0"
41554118
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
41564119
integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=
@@ -6218,11 +6181,6 @@ require-from-string@^2.0.1:
62186181
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
62196182
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
62206183

6221-
requires-port@^1.0.0:
6222-
version "1.0.0"
6223-
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
6224-
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
6225-
62266184
resolve-from@^3.0.0:
62276185
version "3.0.0"
62286186
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"

0 commit comments

Comments
 (0)