Skip to content

Commit 35af5a0

Browse files
committed
feat: upgrade for weapp v0.10
1 parent ea02d46 commit 35af5a0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

gulpfile.babel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import clean from 'gulp-clean';
1111
import concat from 'gulp-concat';
1212
import rename from 'gulp-rename';
1313
import uglify from 'gulp-uglify';
14-
import insert from 'gulp-insert';
1514
import source from 'vinyl-source-stream';
1615
import streamify from 'gulp-streamify';
1716
import browserify from 'browserify';
@@ -96,7 +95,6 @@ gulp.task('bundle-weapp', () =>
9695
.pipe(streamify(babel({
9796
compact: false
9897
})))
99-
.pipe(streamify(insert.prepend('var exports = module.exports = {};')))
10098
.pipe(gulp.dest('dist'))
10199
)
102100

@@ -133,6 +131,9 @@ gulp.task('babel-demo', ['clean-demo'], () => {
133131
// 上传到 CDN
134132
gulp.task('upload', () => {
135133
uploadCDN('./dist/av-min.js', getAVVersion(), () => {});
134+
uploadCDN('./dist/av-weapp-min.js', getAVVersion(), () => {});
135+
uploadCDN('./dist/av.js', getAVVersion(), () => {});
136+
uploadCDN('./dist/av-weapp.js', getAVVersion(), () => {});
136137
});
137138

138139
// 生成 release 文件

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"gulp-clean": "^0.3.1",
4141
"gulp-concat": "^2.4.3",
4242
"gulp-eslint": "^0.13.2",
43-
"gulp-insert": "^0.5.0",
4443
"gulp-rename": "^1.2.0",
4544
"gulp-streamify": "^1.0.2",
4645
"gulp-uglify": "^1.0.2",
@@ -49,7 +48,7 @@
4948
"nyc": "^8.1.0",
5049
"should": "^11.1.0",
5150
"vinyl-source-stream": "^1.1.0",
52-
"weapp-polyfill": "github:leancloud/weapp-polyfill#0368089"
51+
"weapp-polyfill": "github:leancloud/weapp-polyfill#33be189"
5352
},
5453
"license": "MIT",
5554
"author": {

src/index-weapp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
require('weapp-polyfill').polyfill(window);
1+
require('weapp-polyfill/auto-polyfill');
22

33
module.exports = require('./index');

0 commit comments

Comments
 (0)