Skip to content

Commit b8434ac

Browse files
committed
Refactored app.js for remove vue-resource and added axios.
1 parent 2d04062 commit b8434ac

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"dev": "gulp watch"
66
},
77
"devDependencies": {
8+
"axios": "^0.16.2",
89
"bootstrap-sass": "^3.3.7",
910
"font-awesome": "^4.7.0",
1011
"gulp": "^3.9.1",
@@ -16,7 +17,6 @@
1617
"laravel-elixir-webpack-official": "^1.0.2",
1718
"lodash": "^4.16.2",
1819
"moment": "^2.18.1",
19-
"vue": "^2.0.1",
20-
"vue-resource": "^1.3.4"
20+
"vue": "^2.0.1"
2121
}
2222
}

resources/assets/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ window.jQuery = window.$ = require('jquery')
44
require('bootstrap-sass')
55

66
import Vue from 'vue'
7-
import VueResource from 'vue-resource'
7+
import axios from 'axios'
88

99
import PrimeiroComponente from './app/components/primeiro-componente.vue'
1010
import VdUsers from './app/users/main.vue'
1111

12-
Vue.use(VueResource)
12+
Vue.prototype.$http = axios
1313

1414
new Vue({
1515
el: '#app',

yarn.lock

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,13 @@ aws4@^1.2.1, aws4@^1.6.0:
321321
version "1.6.0"
322322
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
323323

324+
axios@^0.16.2:
325+
version "0.16.2"
326+
resolved "https://registry.yarnpkg.com/axios/-/axios-0.16.2.tgz#ba4f92f17167dfbab40983785454b9ac149c3c6d"
327+
dependencies:
328+
follow-redirects "^1.2.3"
329+
is-buffer "^1.1.5"
330+
324331
babel-code-frame@^6.26.0:
325332
version "6.26.0"
326333
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
@@ -1777,7 +1784,7 @@ debug@2.6.8:
17771784
dependencies:
17781785
ms "2.0.0"
17791786

1780-
debug@2.X, debug@^2.2.0, debug@^2.6.8:
1787+
debug@2.X, debug@^2.2.0, debug@^2.4.5, debug@^2.6.8:
17811788
version "2.6.9"
17821789
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
17831790
dependencies:
@@ -2232,6 +2239,12 @@ flatten@^1.0.2:
22322239
version "1.0.2"
22332240
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
22342241

2242+
follow-redirects@^1.2.3:
2243+
version "1.2.4"
2244+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.4.tgz#355e8f4d16876b43f577b0d5ce2668b9723214ea"
2245+
dependencies:
2246+
debug "^2.4.5"
2247+
22352248
font-awesome@^4.7.0:
22362249
version "4.7.0"
22372250
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy