Skip to content

Commit

Permalink
Remove vue-resource dependency and use axios on demo (close #44)
Browse files Browse the repository at this point in the history
  • Loading branch information
pespantelis committed Mar 4, 2017
1 parent 200b6c1 commit b10bab9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Available through npm as `vue-typeahead`.
```
npm install --save vue-typeahead
```
> Also, you need to install the [`vue-resource`](https://github.com/vuejs/vue-resource) plugin.
> Also, you need to install a HTTP client like [`axios`](https://github.com/mzabriskie/axios).
## Usage
If you are using `[email protected]+`, you could use the new [`extends`](http://vuejs.org/api/#extends) property (see below).
Expand Down
4 changes: 2 additions & 2 deletions demo/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Vue from 'vue'
import VueResource from 'vue-resource'
import Axios from 'axios'
import Typeahead from './Typeahead.vue'

Vue.use(VueResource)
Vue.prototype.$http = Axios

new Vue({
el: 'body',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
},
"dependencies": {
"babel-runtime": "^6.0.0",
"vue": "^1.0.21",
"vue-resource": "^1.0.0"
"vue": "^1.0.21"
},
"devDependencies": {
"axios": "^0.15.3",
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {

fetch () {
if (!this.$http) {
return util.warn('You need to install the `vue-resource` plugin', this)
return util.warn('You need to provide a HTTP client', this)
}

if (!this.src) {
Expand Down

0 comments on commit b10bab9

Please sign in to comment.