-
Notifications
You must be signed in to change notification settings - Fork 515
优化项目结构 #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
优化项目结构 #504
Conversation
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
==========================================
+ Coverage 42.21% 43.22% +1.00%
==========================================
Files 9 15 +6
Lines 514 849 +335
Branches 113 155 +42
==========================================
+ Hits 217 367 +150
- Misses 285 472 +187
+ Partials 12 10 -2
Continue to review full report at Codecov.
|
| export * from './observable' | ||
|
|
||
| export * from './base64' | ||
| export * from './helper' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index + export 可以绕过 helper
src/utils/compress.ts
Outdated
| @@ -1,5 +1,5 @@ | |||
| import { EXIF } from 'exif-js' | |||
| import { createObjectURL, getTransform } from './utils' | |||
| import { createObjectURL, getTransform } from '.' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
循环引用?
好像不止一个这种东西 check 一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check 完了
|
|
||
| export { urlSafeBase64Encode, urlSafeBase64Decode } from './base64' | ||
|
|
||
| export { CompressResult } from './compress' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删了?
| import Resume from './resume' | ||
| import Direct from './direct' | ||
| import { UploadOptions, UploadHandler } from './base' | ||
| import Logger from '../logger' | ||
| import { MB } from '../utils' | ||
| import { UploadCompleteData } from '../api' | ||
| import { CustomError, Observable, IObserver, MB } from '../utils' | ||
| import { Config, Extra, UploadHandler, UploadOptions, UploadProgress } from './base' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺序调一下?
src/upload/index.ts
Outdated
| * @param config 上传任务的配置 | ||
| * @returns 返回用于上传任务的可观察对象 | ||
| */ | ||
| export function upload( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default 应该换成这个?
upload 模块的缺省导出是 upload 很正常?
我看其他的东西也没导出
| import { Pool } from '../pool' | ||
| import { uploadChunk, uploadComplete, initUploadParts, UploadChunkData } from '../api' | ||
| import Base, { Progress, UploadInfo, Extra } from './base' | ||
| import * as utils from '../utils' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同顺序
src/utils/base64.ts
Outdated
|
|
||
| export function utf8Encode(argString: any) { | ||
| // https://github.com/locutusjs/locutus/blob/master/src/php/xml/utf8_encode.js | ||
| function utf8Encode(argString: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIP: 为什么 argString 的类型不是 string = =
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.