File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ gulp.task('oss', function(){
1515 secretAccessKey: ' *********' ,
1616 endpoint: ' http://oss-cn-***.aliyuncs.com' ,
1717 apiVersion: ' 2013-10-15' ,
18- prefix: ' assets/js' ,
18+ prefix: ' assets/js' , // for no prefix: prefix: ''
1919 bucket: ' test'
2020 };
2121 // ./js/a.js -> <prefix>/a.js
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function oss(option) {
3939 }
4040 var getFileKey = function ( ) {
4141 return option . prefix
42- + ( ( ! option . prefix || option . prefix [ option . prefix . length - 1 ] ) === '/' ? '' : '/' )
42+ + ( ( ! option . prefix || ( option . prefix [ option . prefix . length - 1 ] ) === '/' ) ? '' : '/' )
4343 + ( option . versioning ? version + '/' : '' )
4444 + path . relative ( file . base , file . path ) ;
4545 } ;
You can’t perform that action at this time.
0 commit comments