Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Sep 10, 2020
1 parent 453b6cd commit 940400f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ import Vue from 'vue'
import XEAjax from 'xe-ajax'
import VXEAjax from 'vxe-ajax'

// use:
Vue.use(VXEAjax, XEAjax)

// vue2.x:
// Vue.prototype.$ajax = XEAjax

// vue3.x:
// app.config.globalProperties.$ajax = XEAjax
```

```html
Expand Down
8 changes: 6 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ gulp.task('build_umd', function () {
}))
.pipe(replace(`global.${exportModuleName} = mod.exports;`, `global.${exportModuleName} = mod.exports.default;`))
.pipe(rename({
basename: pack.name
basename: pack.name,
suffix: '.umd',
extname: '.js'
}))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(rename({
extname: '.min.js'
basename: pack.name,
suffix: '.umd.min',
extname: '.js'
}))
.pipe(gulp.dest('dist'))
})
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "vxe-ajax",
"version": "2.2.0",
"version": "2.2.1",
"description": "用于 Vue 全局安装 xe-ajax",
"main": "dist/vxe-ajax.common.js",
"unpkg": "dist/vxe-ajax.js",
"jsdelivr": "dist/vxe-ajax.js",
"unpkg": "dist/vxe-ajax.umd.min.js",
"jsdelivr": "dist/vxe-ajax.umd.min.js",
"typings": "index.d.ts",
"scripts": {
"lib": "gulp build",
Expand Down

0 comments on commit 940400f

Please sign in to comment.