Skip to content

Conversation

@blizzardzheng
Copy link
Contributor

增加插件系统开发支持

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 吧

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.

3 participants