Comparing version 1.0.3 to 1.1.0
@@ -9,8 +9,2 @@ 'use strict'; | ||
var _axios = require('axios'); | ||
var _axios2 = _interopRequireDefault(_axios); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
@@ -80,3 +74,3 @@ * Copied from vue-resource | ||
function plugin(Vue) { | ||
function plugin(Vue, axios) { | ||
@@ -87,4 +81,9 @@ if (plugin.installed) { | ||
Vue.axios = _axios2.default; | ||
if (!axios) { | ||
console.error('You have to install axios'); | ||
return; | ||
} | ||
Vue.axios = axios; | ||
Object.defineProperties(Vue.prototype, { | ||
@@ -91,0 +90,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isFunction(e){return"function"==typeof e}function isPlainObject(e){return isObject(e)&&Object.getPrototypeOf(e)==Object.prototype}function isObject(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))}function _merge(e,t,o){for(var i in t)o&&(isPlainObject(t[i])||isArray(t[i]))?(isPlainObject(t[i])&&!isPlainObject(e[i])&&(e[i]={}),isArray(t[i])&&!isArray(e[i])&&(e[i]=[]),_merge(e[i],t[i],o)):void 0!==t[i]&&(e[i]=t[i])}function merge(e){var t=slice.call(arguments,1);return t.forEach(function(t){_merge(e,t,!0)}),e}function options(e,t,o){return o=o||{},isFunction(o)&&(o=o.call(t)),merge(e.bind({$vm:t,$options:o}),e,{$options:o})}function plugin(e){plugin.installed||(e.axios=_axios2.default,Object.defineProperties(e.prototype,{axios:{get:function(){return options(e.axios,this,this.$options.axios)}}}))}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_axios=require("axios"),_axios2=_interopRequireDefault(_axios),slice=[].slice,isArray=Array.isArray;"undefined"!=typeof window&&window.Vue&&window.Vue.use(plugin),exports.default=plugin; | ||
"use strict";function isFunction(e){return"function"==typeof e}function isPlainObject(e){return isObject(e)&&Object.getPrototypeOf(e)==Object.prototype}function isObject(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))}function _merge(e,o,t){for(var n in o)t&&(isPlainObject(o[n])||isArray(o[n]))?(isPlainObject(o[n])&&!isPlainObject(e[n])&&(e[n]={}),isArray(o[n])&&!isArray(e[n])&&(e[n]=[]),_merge(e[n],o[n],t)):void 0!==o[n]&&(e[n]=o[n])}function merge(e){var o=slice.call(arguments,1);return o.forEach(function(o){_merge(e,o,!0)}),e}function options(e,o,t){return t=t||{},isFunction(t)&&(t=t.call(o)),merge(e.bind({$vm:o,$options:t}),e,{$options:t})}function plugin(e,o){if(!plugin.installed){if(!o)return void console.error("You have to install axios");e.axios=o,Object.defineProperties(e.prototype,{axios:{get:function(){return options(e.axios,this,this.$options.axios)}}})}}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},slice=[].slice,isArray=Array.isArray;"undefined"!=typeof window&&window.Vue&&window.Vue.use(plugin),exports.default=plugin; |
const gulp = require('gulp'); | ||
const sourcemaps = require('gulp-sourcemaps'); | ||
const babel = require('gulp-babel'); | ||
@@ -9,10 +8,10 @@ const uglify = require('gulp-uglifyjs'); | ||
return gulp.src('src/index.js') | ||
.pipe(sourcemaps.init()) | ||
.pipe(babel({ | ||
presets: ['es2015'] | ||
})) | ||
.pipe(rename('vue-axios.es5.js')) | ||
.pipe(gulp.dest('dist')) | ||
.pipe(uglify()) | ||
.pipe(rename('vue-axios.min.js')) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('dist')); | ||
}); |
{ | ||
"name": "vue-axios", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "A small wrapper for integrating axios to Vuejs", | ||
@@ -25,2 +25,3 @@ "main": "dist/vue-axios.min.js", | ||
"devDependencies": { | ||
"vue": "^2.0.3", | ||
"babel-core": "^6.18.0", | ||
@@ -31,9 +32,6 @@ "babel-preset-es2015": "^6.18.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sourcemaps": "^2.2.0", | ||
"gulp-uglifyjs": "^0.6.2", | ||
"vue": "^2.0.3" | ||
"gulp-uglifyjs": "^0.6.2" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.15.2" | ||
} | ||
} |
@@ -1,3 +0,1 @@ | ||
import axios from 'axios'; | ||
/** | ||
@@ -66,3 +64,3 @@ * Copied from vue-resource | ||
function plugin(Vue) { | ||
function plugin(Vue, axios) { | ||
@@ -73,2 +71,7 @@ if (plugin.installed) { | ||
if (!axios) { | ||
console.error('You have to install axios') | ||
return | ||
} | ||
Vue.axios = axios | ||
@@ -75,0 +78,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
7
155
0
30478
17
- Removedaxios@^0.15.2
- Removedaxios@0.15.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removedfollow-redirects@1.0.0(transitive)
- Removedms@2.0.0(transitive)