{"action":"created","issue":{"url":"https://api.github.com/repos/ecomfe/edp-core/issues/8","labels_url":"https://api.github.com/repos/ecomfe/edp-core/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ecomfe/edp-core/issues/8/comments","events_url":"https://api.github.com/repos/ecomfe/edp-core/issues/8/events","html_url":"https://github.com/ecomfe/edp-core/issues/8","id":111014985,"number":8,"title":"改善 edp install 的易用性","user":{"login":"firede","id":157338,"avatar_url":"https://avatars.githubusercontent.com/u/157338?v=3","gravatar_id":"","url":"https://api.github.com/users/firede","html_url":"https://github.com/firede","followers_url":"https://api.github.com/users/firede/followers","following_url":"https://api.github.com/users/firede/following{/other_user}","gists_url":"https://api.github.com/users/firede/gists{/gist_id}","starred_url":"https://api.github.com/users/firede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firede/subscriptions","organizations_url":"https://api.github.com/users/firede/orgs","repos_url":"https://api.github.com/users/firede/repos","events_url":"https://api.github.com/users/firede/events{/privacy}","received_events_url":"https://api.github.com/users/firede/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-12T16:56:02Z","updated_at":"2015-10-14T11:44:12Z","closed_at":null,"body":"对新用户来说，无法通过 `edp` 获知有哪些可用的 `Builtin Commands` 和 `User Commands`，入门时的认知门槛较高。\r\n\r\n建议以类似 `yeoman` 的交互方式，给未传入 `args` 的 `edp install` 增加些功能。\r\n\r\n* 第一步：选择要安装的 Commands 类型\r\n    * `安装 User Commands` 选项\r\n    * `安装 Builtin Commands` 选项，安装 _指定_ 或 _全部_ Builtin Commands\r\n    * `退出` 选项\r\n* 第二步：选择、确认并安装所需的 Commands\r\n* 第三步：如果安装的是单个 Commands，显示该 Commands 的 help\r\n\r\n原来的 `edp install [packages]`，功能仍然保持不变。\r\n\r\n---\r\n\r\n**Update: 2015-10-14**\r\n\r\n* 因为 `edp install` 入口过深，考虑放到 `edp` 命令中做，`edp` 命令原来的功能移至 `edp -h`\r\n* 是否提供 [Command 辅助模块](https://www.npmjs.com/search?q=edp-build-) 的查找与安装功能 (?)\r\n\r\n---\r\n\r\n### 交互\r\n\r\n脑补了一下交互，从键入 `edp` 命令开始，大概是这样：\r\n\r\n```\r\n? 你想干啥？ (Use arrow keys)\r\n❯ 查看已安装 Commands\r\n  安装 Builtin Commands...\r\n  安装 User Commands...\r\n  帮助文档\r\n  退出\r\n```\r\n\r\n**查看已安装 Commands**\r\n\r\n效果等同现有的 `edp` 命令。\r\n\r\n**安装 Builtin Commands...**\r\n\r\n```\r\n? 你想干啥？  安装 Builtin Commands...\r\n  全部安装\r\n  edp-lint\r\n  edp-beautify\r\n❯ edp-doctor\r\n  edp-test\r\n  返回\r\n```\r\n\r\n```\r\n? 你想干啥？  安装 Builtin Commands...\r\n? 安装 Builtin Commands...  edp-doctor\r\n  edp-doctor 1.0.9\r\n  检查项目的配置情况，发现可能存在的问题\r\n? 确定要安装 edp-doctor？(Y/n)\r\n```\r\n\r\n```\r\n? 确定要安装 edp-doctor？(Y/n) Yes\r\n  Done.\r\n\r\nedp-doctor help:\r\n  显示帮助文档...\r\n```\r\n\r\n**安装 User Commands...**\r\n\r\n与上面类似，去 npm 找 `edpx-` 开头的 package（或根据 keywords），然后列出来。\r\n区别是没有 `全部安装` 的选项。"},"comment":{"url":"https://api.github.com/repos/ecomfe/edp-core/issues/comments/148025686","html_url":"https://github.com/ecomfe/edp-core/issues/8#issuecomment-148025686","issue_url":"https://api.github.com/repos/ecomfe/edp-core/issues/8","id":148025686,"user":{"login":"firede","id":157338,"avatar_url":"https://avatars.githubusercontent.com/u/157338?v=3","gravatar_id":"","url":"https://api.github.com/users/firede","html_url":"https://github.com/firede","followers_url":"https://api.github.com/users/firede/followers","following_url":"https://api.github.com/users/firede/following{/other_user}","gists_url":"https://api.github.com/users/firede/gists{/gist_id}","starred_url":"https://api.github.com/users/firede/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firede/subscriptions","organizations_url":"https://api.github.com/users/firede/orgs","repos_url":"https://api.github.com/users/firede/repos","events_url":"https://api.github.com/users/firede/events{/privacy}","received_events_url":"https://api.github.com/users/firede/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T11:44:12Z","updated_at":"2015-10-14T11:44:12Z","body":"> 比如在console的一开始就说，你可以通过edp install命令添加command之类的\r\n\r\n嗯，那还是把范围限定在 `edp install` 吧，直接改 `edp` 命令的确有点儿激进。"}}