{"action":"closed","issue":{"url":"https://api.github.com/repos/ant-design/antd-bin/issues/19","labels_url":"https://api.github.com/repos/ant-design/antd-bin/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/antd-bin/issues/19/comments","events_url":"https://api.github.com/repos/ant-design/antd-bin/issues/19/events","html_url":"https://github.com/ant-design/antd-bin/issues/19","id":113518037,"number":19,"title":"使用 yeoman 或其他 scaffold 工具代替 antd init","user":{"login":"afc163","id":507615,"avatar_url":"https://avatars.githubusercontent.com/u/507615?v=3","gravatar_id":"","url":"https://api.github.com/users/afc163","html_url":"https://github.com/afc163","followers_url":"https://api.github.com/users/afc163/followers","following_url":"https://api.github.com/users/afc163/following{/other_user}","gists_url":"https://api.github.com/users/afc163/gists{/gist_id}","starred_url":"https://api.github.com/users/afc163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afc163/subscriptions","organizations_url":"https://api.github.com/users/afc163/orgs","repos_url":"https://api.github.com/users/afc163/repos","events_url":"https://api.github.com/users/afc163/events{/privacy}","received_events_url":"https://api.github.com/users/afc163/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-27T06:41:40Z","updated_at":"2015-10-27T09:42:35Z","closed_at":"2015-10-27T09:42:35Z","body":"目前的痛点是需要首先安装 antd-bin 到全局用于 init 。\r\n\r\n然后还要在项目目录里安装一遍 `antd-bin`，用于 scripts 的命令。\r\n\r\n\r\n```\r\n$ npm install antd-bin -g\r\n$ mkdir antd-demo && cd antd-demo\r\n$ antd init\r\n$ npm install  // 这里又会安装一遍 antd-bin\r\n```\r\n\r\n解决方案有两种：\r\n\r\n1. 使用 yeoman 或 [slush](http://slushjs.github.io/)\r\n\r\n   ```bash\r\n   $ npm install yeoman -g\r\n   $ npm install generator-antd -g\r\n   $ mkdir antd-demo && cd antd-demo\r\n   $ yo antd\r\n   ```\r\n\r\n2. 或者抽离 antd-init\r\n\r\n   ```bash\r\n   $ npm install antd-init -g\r\n   $ mkdir antd-demo && cd antd-demo\r\n   $ antd init\r\n   $ npm install\r\n   ```"}}