-
Notifications
You must be signed in to change notification settings - Fork 152
增加插件系统的开发支持 #56
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
增加插件系统的开发支持 #56
Conversation
@@ -13,7 +13,7 @@ const defaultRequestOptions = { | |||
const defaultFetchOptions = { | |||
method: 'GET', | |||
mode: 'cors', | |||
credentials: 'include', | |||
credentials: __DEV__ ? '' : 'include', |
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.
这个是为什么?
webpack_configs/devServer.config.js
Outdated
}) | ||
}), | ||
new webpack.DefinePlugin({ | ||
__PACKAGE__: JSON.stringify(process.env.PACKAGE_SERVER || ''), |
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.
为什么不直接叫 PACKAGE_SERVER?或者 PACKAGE_URL,只是 PACAKGE 的话感觉语义上不清晰
app/components/Package/reducer.js
Outdated
if (extensionIds.includes(pkgId) === pkg.enabled) return state | ||
|
||
return update(state, { | ||
const res = update(state, { |
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.
这个统一命名成 nextState 吧
app/backendAPI/packageAPI.js
Outdated
@@ -1,8 +1,14 @@ | |||
/* @flow weak */ | |||
import { request } from '../utils' | |||
import config from '../config' | |||
const packageServer = config.packageServer | |||
|
|||
const { packageServer, extensionServer } = config |
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.
extensionServer 没有用到吧
app/backendAPI/packageAPI.js
Outdated
export const fetchPackageInfo = (pkgName) => request.get(`${packageServer}/packages/${pkgName}`) | ||
export const fetchPackageScript = (pkgName) => request.get(`${packageServer}/packages/${pkgName}/download`) | ||
export const fetchPackageInfo = (pkgName) => | ||
request.get(`${packageServer}/packages/${pkgName}`) |
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.
这个诡异的换行是什么情况…
app/backendAPI/packageAPI.js
Outdated
export const fetchPackageInfo = (pkgName) => | ||
request.get(`${packageServer}/packages/${pkgName}`) | ||
export const fetchPackageScript = (pkgName, debugServer) => { | ||
if (debugServer) { |
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.
现在 debugServer 的情况 ok 了,那生产的情况是怎么考虑的?
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.
生产情况放其他mr,等待和后端协调接口
增加插件系统开发支持