Skip to content

增加插件系统的开发支持 #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

Merged
merged 3 commits into from
Feb 28, 2017
Merged

Conversation

blizzardzheng
Copy link
Contributor

增加插件系统开发支持

@@ -13,7 +13,7 @@ const defaultRequestOptions = {
const defaultFetchOptions = {
method: 'GET',
mode: 'cors',
credentials: 'include',
credentials: __DEV__ ? '' : 'include',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是为什么?

})
}),
new webpack.DefinePlugin({
__PACKAGE__: JSON.stringify(process.env.PACKAGE_SERVER || ''),
Copy link
Contributor

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 的话感觉语义上不清晰

if (extensionIds.includes(pkgId) === pkg.enabled) return state

return update(state, {
const res = update(state, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个统一命名成 nextState 吧

@@ -1,8 +1,14 @@
/* @flow weak */
import { request } from '../utils'
import config from '../config'
const packageServer = config.packageServer

const { packageServer, extensionServer } = config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extensionServer 没有用到吧

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}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个诡异的换行是什么情况…

export const fetchPackageInfo = (pkgName) =>
request.get(`${packageServer}/packages/${pkgName}`)
export const fetchPackageScript = (pkgName, debugServer) => {
if (debugServer) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在 debugServer 的情况 ok 了,那生产的情况是怎么考虑的?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

生产情况放其他mr,等待和后端协调接口

@hackape hackape merged commit 234f84d into master Feb 28, 2017
@hackape hackape deleted the zhengxinqi/plugin_exchange branch March 27, 2017 09:57
@hackape hackape restored the zhengxinqi/plugin_exchange branch March 27, 2017 09:57
@hackape hackape deleted the zhengxinqi/plugin_exchange branch March 27, 2017 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants