{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/generator-talend/pulls/comments/88621906","pull_request_review_id":9190023,"id":88621906,"diff_hunk":"@@ -71,22 +76,37 @@ module.exports = yeoman.Base.extend({\n \t},\n \n \twriting() {\n-\t\tthis.fs.copyTpl(\n-\t\t\tthis.templatePath(`src/${this.props.type}.component.js`),\n-\t\t\tthis.destinationPath(`${this.props.path}/${this.props.name}/${this.props.name}.component.js`),\n-\t\t\tthis\n-\t\t);\n-\t\tthis.fs.copyTpl(\n-\t\t\tthis.templatePath(`src/${this.props.test}.test.js`),\n-\t\t\tthis.destinationPath(`${this.props.path}/${this.props.name}/${this.props.name}.test.js`),\n-\t\t\tthis\n-\t\t);\n+\t\tif (!this.props.isfull) {\n+\t\t\tthis.fs.copyTpl(\n+\t\t\t\tthis.templatePath(`src/${this.props.type}.component.js`),\n+\t\t\t\tthis.destinationPath(`${this.props.path}/${this.props.name}/${this.props.name}.component.js`),\n+\t\t\t\tthis\n+\t\t\t);\n+\t\t\tthis.fs.copyTpl(\n+\t\t\t\tthis.templatePath(`src/${this.props.test}.test.js`),\n+\t\t\t\tthis.destinationPath(`${this.props.path}/${this.props.name}/${this.props.name}.test.js`),\n+\t\t\t\tthis\n+\t\t\t);\n+\t\t} else {\n+\t\t\t['stateless', 'es6.class', 'connect'].forEach((t) => {","path":"generators/react-component/index.js","position":62,"original_position":62,"commit_id":"3156e38383ba39f5fc533ab8a963e2a368225438","original_commit_id":"3156e38383ba39f5fc533ab8a963e2a368225438","user":{"login":"talend-glorieux","id":19686241,"avatar_url":"https://avatars.githubusercontent.com/u/19686241?v=3","gravatar_id":"","url":"https://api.github.com/users/talend-glorieux","html_url":"https://github.com/talend-glorieux","followers_url":"https://api.github.com/users/talend-glorieux/followers","following_url":"https://api.github.com/users/talend-glorieux/following{/other_user}","gists_url":"https://api.github.com/users/talend-glorieux/gists{/gist_id}","starred_url":"https://api.github.com/users/talend-glorieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talend-glorieux/subscriptions","organizations_url":"https://api.github.com/users/talend-glorieux/orgs","repos_url":"https://api.github.com/users/talend-glorieux/repos","events_url":"https://api.github.com/users/talend-glorieux/events{/privacy}","received_events_url":"https://api.github.com/users/talend-glorieux/received_events","type":"User","site_admin":false},"body":"I'm not a really big fan of that naming. What about 'component', 'container', 'connect'?\r\n@Talend/frontend Tell us what you think ;)","created_at":"2016-11-18T09:18:01Z","updated_at":"2016-11-18T09:18:01Z","html_url":"https://github.com/Talend/generator-talend/pull/24#discussion_r88621906","pull_request_url":"https://api.github.com/repos/Talend/generator-talend/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/comments/88621906"},"html":{"href":"https://github.com/Talend/generator-talend/pull/24#discussion_r88621906"},"pull_request":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/generator-talend/pulls/24","id":94211362,"html_url":"https://github.com/Talend/generator-talend/pull/24","diff_url":"https://github.com/Talend/generator-talend/pull/24.diff","patch_url":"https://github.com/Talend/generator-talend/pull/24.patch","issue_url":"https://api.github.com/repos/Talend/generator-talend/issues/24","number":24,"state":"open","locked":false,"title":"feat(react-component): add full feature component option","user":{"login":"jmfrancois","id":19857479,"avatar_url":"https://avatars.githubusercontent.com/u/19857479?v=3","gravatar_id":"","url":"https://api.github.com/users/jmfrancois","html_url":"https://github.com/jmfrancois","followers_url":"https://api.github.com/users/jmfrancois/followers","following_url":"https://api.github.com/users/jmfrancois/following{/other_user}","gists_url":"https://api.github.com/users/jmfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/jmfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmfrancois/subscriptions","organizations_url":"https://api.github.com/users/jmfrancois/orgs","repos_url":"https://api.github.com/users/jmfrancois/repos","events_url":"https://api.github.com/users/jmfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/jmfrancois/received_events","type":"User","site_admin":false},"body":"#**Please check if the PR fulfills these requirements**\r\n\r\n- [x] The commit(s) message(s) follows our [guidelines](https://github.com/talend/tools/blob/master/tools-root-github/CONTRIBUTING.md#commit-message-format)\r\n- [ ] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n**What is the current behavior?** (You can also link to an open issue here)\r\n\r\nYou can only create a component of one type in the available list\r\n\r\n**What is the new behavior?**\r\n\r\n\r\nin your app you may want to create a full feature component.\r\nfor this case you will create es6 class (using the generator you will have tests + styles)\r\nbut you will mix the three things in one:\r\n* rendering HTML\r\n* business logics using lifecyle and so on\r\n* connect to the store to handle the state\r\n\r\nIf you do all that in one class you will have hard time to do great tests.\r\n\r\nSo the idea is you can create a component which is the results of 3 components:\r\n* the stateless responsible for the rendering\r\n* the stateful responsible for the feature\r\n* the connect responsible to sync the state in redux\r\n\r\n**Does this PR introduce a breaking change?**\r\n\r\n- [ ] Yes\r\n- [x] No\r\n\r\n\r\n**Other information**:\r\n\r\n```shell\r\n     _-----_\r\n    |       |    ╭──────────────────────────╮\r\n    |--(o)--|    │ Welcome to the react-cmf │\r\n   `---------´   │        generator!        │\r\n    ( _´U`_ )    ╰──────────────────────────╯\r\n    /___A___\\   /\r\n     |  ~  |\r\n   __'.___.'__\r\n ´   `  |° ´ Y `\r\n\r\n? name MyComponent\r\n? full component (pure + es6 + connect) Yes\r\n? test snapshot\r\n? css Yes\r\n? path src/app/components\r\n   create src/app/components/MyComponent/MyComponent.stateless.js\r\n   create src/app/components/MyComponent/MyComponent.stateless.test.js\r\n   create src/app/components/MyComponent/MyComponent.es6.class.js\r\n   create src/app/components/MyComponent/MyComponent.es6.class.test.js\r\n   create src/app/components/MyComponent/MyComponent.connect.js\r\n   create src/app/components/MyComponent/MyComponent.connect.test.js\r\n   create src/app/components/MyComponent/index.js\r\n   create src/app/components/MyComponent/MyComponent.scss\r\n```","created_at":"2016-11-17T17:19:09Z","updated_at":"2016-11-18T09:18:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf7c33321930091d5f4f8a84d66eda00b4e43894","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/generator-talend/pulls/24/commits","review_comments_url":"https://api.github.com/repos/Talend/generator-talend/pulls/24/comments","review_comment_url":"https://api.github.com/repos/Talend/generator-talend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/generator-talend/issues/24/comments","statuses_url":"https://api.github.com/repos/Talend/generator-talend/statuses/3156e38383ba39f5fc533ab8a963e2a368225438","head":{"label":"Talend:fix/react-component/add-multi-types-options","ref":"fix/react-component/add-multi-types-options","sha":"3156e38383ba39f5fc533ab8a963e2a368225438","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":68081928,"name":"generator-talend","full_name":"Talend/generator-talend","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/generator-talend","description":"Talend's JavaScript Yeoman Generator","fork":false,"url":"https://api.github.com/repos/Talend/generator-talend","forks_url":"https://api.github.com/repos/Talend/generator-talend/forks","keys_url":"https://api.github.com/repos/Talend/generator-talend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/generator-talend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/generator-talend/teams","hooks_url":"https://api.github.com/repos/Talend/generator-talend/hooks","issue_events_url":"https://api.github.com/repos/Talend/generator-talend/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/generator-talend/events","assignees_url":"https://api.github.com/repos/Talend/generator-talend/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/generator-talend/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/generator-talend/tags","blobs_url":"https://api.github.com/repos/Talend/generator-talend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/generator-talend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/generator-talend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/generator-talend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/generator-talend/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/generator-talend/languages","stargazers_url":"https://api.github.com/repos/Talend/generator-talend/stargazers","contributors_url":"https://api.github.com/repos/Talend/generator-talend/contributors","subscribers_url":"https://api.github.com/repos/Talend/generator-talend/subscribers","subscription_url":"https://api.github.com/repos/Talend/generator-talend/subscription","commits_url":"https://api.github.com/repos/Talend/generator-talend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/generator-talend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/generator-talend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/generator-talend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/generator-talend/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/generator-talend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/generator-talend/merges","archive_url":"https://api.github.com/repos/Talend/generator-talend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/generator-talend/downloads","issues_url":"https://api.github.com/repos/Talend/generator-talend/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/generator-talend/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/generator-talend/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/generator-talend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/generator-talend/labels{/name}","releases_url":"https://api.github.com/repos/Talend/generator-talend/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/generator-talend/deployments","created_at":"2016-09-13T06:41:43Z","updated_at":"2016-10-26T12:25:22Z","pushed_at":"2016-11-18T09:12:34Z","git_url":"git://github.com/Talend/generator-talend.git","ssh_url":"git@github.com:Talend/generator-talend.git","clone_url":"https://github.com/Talend/generator-talend.git","svn_url":"https://github.com/Talend/generator-talend","homepage":"","size":110,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"e27a6ee6ca5a8ce162aaddc31fb5c42308b3a099","user":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":68081928,"name":"generator-talend","full_name":"Talend/generator-talend","owner":{"login":"Talend","id":459687,"avatar_url":"https://avatars.githubusercontent.com/u/459687?v=3","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Talend/generator-talend","description":"Talend's JavaScript Yeoman Generator","fork":false,"url":"https://api.github.com/repos/Talend/generator-talend","forks_url":"https://api.github.com/repos/Talend/generator-talend/forks","keys_url":"https://api.github.com/repos/Talend/generator-talend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/generator-talend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/generator-talend/teams","hooks_url":"https://api.github.com/repos/Talend/generator-talend/hooks","issue_events_url":"https://api.github.com/repos/Talend/generator-talend/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/generator-talend/events","assignees_url":"https://api.github.com/repos/Talend/generator-talend/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/generator-talend/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/generator-talend/tags","blobs_url":"https://api.github.com/repos/Talend/generator-talend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/generator-talend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/generator-talend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/generator-talend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/generator-talend/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/generator-talend/languages","stargazers_url":"https://api.github.com/repos/Talend/generator-talend/stargazers","contributors_url":"https://api.github.com/repos/Talend/generator-talend/contributors","subscribers_url":"https://api.github.com/repos/Talend/generator-talend/subscribers","subscription_url":"https://api.github.com/repos/Talend/generator-talend/subscription","commits_url":"https://api.github.com/repos/Talend/generator-talend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/generator-talend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/generator-talend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/generator-talend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/generator-talend/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/generator-talend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/generator-talend/merges","archive_url":"https://api.github.com/repos/Talend/generator-talend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/generator-talend/downloads","issues_url":"https://api.github.com/repos/Talend/generator-talend/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/generator-talend/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/generator-talend/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/generator-talend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/generator-talend/labels{/name}","releases_url":"https://api.github.com/repos/Talend/generator-talend/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/generator-talend/deployments","created_at":"2016-09-13T06:41:43Z","updated_at":"2016-10-26T12:25:22Z","pushed_at":"2016-11-18T09:12:34Z","git_url":"git://github.com/Talend/generator-talend.git","ssh_url":"git@github.com:Talend/generator-talend.git","clone_url":"https://github.com/Talend/generator-talend.git","svn_url":"https://github.com/Talend/generator-talend","homepage":"","size":110,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/24"},"html":{"href":"https://github.com/Talend/generator-talend/pull/24"},"issue":{"href":"https://api.github.com/repos/Talend/generator-talend/issues/24"},"comments":{"href":"https://api.github.com/repos/Talend/generator-talend/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/generator-talend/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/generator-talend/statuses/3156e38383ba39f5fc533ab8a963e2a368225438"}}}}
{"actor":{"display_login":"talend-glorieux"}}