Skip to content
This repository was archived by the owner on Dec 20, 2017. It is now read-only.

重构命令行工具#124

Merged
sdjcw merged 8 commits intoleancloud:masterfrom
sdjcw:master
Mar 8, 2016
Merged

重构命令行工具#124
sdjcw merged 8 commits intoleancloud:masterfrom
sdjcw:master

Conversation

@sdjcw
Copy link
Contributor

@sdjcw sdjcw commented Feb 16, 2016

  • 使用 lc 替代 avoscloud 命令。
  • 使用 lc up 作为启动本地项目的命令,而不是之前的 avoscloud 回车。
  • 使用 lc app <add|checkout|rm> 替代 avoscloud <add|checkout|rm>
  • 程序执行时尽量不使用 exitWith 方法,防止一些统一的错误处理和
    统计程序没有机会执行。
  • 使用统一的 request 方法替代之前的 ajaxrequestCloud 方法,
    统一处理 http 响应,防止直接输出 html 片段。
  • 在所有文案中,使用 云引擎 替代 云代码
  • 增加单元测试。
  • 更新了 avoscloud_completion.sh

* 使用 `lc` 替代 `avoscloud` 命令。
* 使用 `lc up` 作为启动本地项目的命令,而不是之前的 `avoscloud` 回车。
* 使用 `lc app <add|checkout|rm>` 替代 `avoscloud <add|checkout|rm>` 。
* 程序执行时尽量不使用 `exitWith` 方法,防止一些统一的错误处理和
  统计程序没有机会执行。
* 使用统一的 `request` 方法替代之前的 `ajax` 和 `requestCloud` 方法,
  统一处理 http 响应,防止直接输出 html 片段。
* 在所有文案中,使用 `云引擎` 替代 `云代码`。
* 增加单元测试。
* 更新了 `avoscloud_completion.sh`
@sdjcw
Copy link
Contributor Author

sdjcw commented Feb 16, 2016

这改动太大,估计 github 上 review 不了。
建议更新下然后本地运行下,还有单元测试。

@aisk
Copy link
Contributor

aisk commented Feb 16, 2016

lc 这个命令名字感觉很容易冲突: https://msdn.microsoft.com/en-us/library/ha0k3c9f(v=vs.110).aspx

感觉还是 lean 比较好一些,也足够短了。

@wangxiao
Copy link
Contributor

冲突有啥解决办法么?我更倾向 lc

@jysperm
Copy link
Contributor

jysperm commented Feb 16, 2016

我也不太建议用 lc, 太短了易冲突,目前为止我们似乎也没在其他地方用这个缩写,还是叫 leancloudleanengine (取决于这个工具是不是只有云引擎的功能)好一些。

@sdjcw
Copy link
Contributor Author

sdjcw commented Feb 16, 2016

那我改成 lean 吧。

@wangxiao
Copy link
Contributor

恩, lean 挺好。

@juvenn
Copy link
Member

juvenn commented Feb 16, 2016

lean 不错

@sdjcw
Copy link
Contributor Author

sdjcw commented Feb 17, 2016

更名完成。

bin/run.js Outdated
}
var latestVersion = body.version;
var changelog = body.changelog || '1.内部重构';
if(latestVersion.localeCompare(version) > 0){
Copy link
Contributor

Choose a reason for hiding this comment

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

这里确实没有做 parseFloat ,转化成数字来比较,包括 version,建议改下。

类似静态代码检查工具很多,包括云引擎支持多语言,
所以这类工具用户自行选择。
@sdjcw sdjcw added review and removed in progress labels Mar 7, 2016
@sdjcw sdjcw self-assigned this Mar 7, 2016
@jysperm
Copy link
Contributor

jysperm commented Mar 7, 2016

我在 4.0 上测试了所有新增功能,在 3.0 上测试了 deploy 和 publish, 没有发现问题。

sdjcw added a commit that referenced this pull request Mar 8, 2016
@sdjcw sdjcw merged commit e23cc9f into leancloud:master Mar 8, 2016
@sdjcw sdjcw removed the review label Mar 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants