{"action":"created","issue":{"url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/3","labels_url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/3/comments","events_url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/3/events","html_url":"https://github.com/holidayextras/generator-webapp-view/pull/3","id":59968265,"number":3,"title":"Tar 197 - Extend generator to create non-shared views in apps","user":{"login":"lukehansell-hx","id":6229129,"avatar_url":"https://avatars.githubusercontent.com/u/6229129?v=3","gravatar_id":"","url":"https://api.github.com/users/lukehansell-hx","html_url":"https://github.com/lukehansell-hx","followers_url":"https://api.github.com/users/lukehansell-hx/followers","following_url":"https://api.github.com/users/lukehansell-hx/following{/other_user}","gists_url":"https://api.github.com/users/lukehansell-hx/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehansell-hx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehansell-hx/subscriptions","organizations_url":"https://api.github.com/users/lukehansell-hx/orgs","repos_url":"https://api.github.com/users/lukehansell-hx/repos","events_url":"https://api.github.com/users/lukehansell-hx/events{/privacy}","received_events_url":"https://api.github.com/users/lukehansell-hx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-05T15:34:43Z","updated_at":"2015-03-09T16:00:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/holidayextras/generator-webapp-view/pulls/3","html_url":"https://github.com/holidayextras/generator-webapp-view/pull/3","diff_url":"https://github.com/holidayextras/generator-webapp-view/pull/3.diff","patch_url":"https://github.com/holidayextras/generator-webapp-view/pull/3.patch"},"body":"#### What does this PR do?\r\nIt would be nice to be able to easily build the non shared React views inside our apps (that are based on the webapp-template). To this end I've extended the generator so that it checks for a `package.json` file in any parent directory, if it finds one then it assumes that we're inside a webapp-template project and begins the process of building an internal non-shared view. If it doesn't find a `package.json` file then it begins the process of building an external shared view.\r\n\r\n#### What unit or integration tests does this PR have?\r\nI've rewritten the original tests as they now only apply to the external generator. I've added new tests for the master generator and the internal one.\r\n\r\n#### What selenium tests does this PR have?\r\nnone.\r\n\r\n#### How should a developer review this?\r\nCheck over the code to make sure I've not left any daft things in there and that the code makes sense and is legible.\r\n\r\n#### How should this be manually tested?\r\nAfter checking out this repo you will have to run `npm link` inside it to make it globally accessible to the yeoman generator. You will also have to have `yo` installed globally.\r\n\r\n1. checkout the webapp-temaplte repo and run the generator inside it using `yo webapp-view` and check the internal generator was used.\r\n  - you should be asked which feature to build for\r\n  - you should see the new view in the feature folder chosen.\r\n2. run the generator using `yo webapp-view` in a directory without a parent dir containing a package.json file and check the external generator was used.\r\n  - you should be asked for a description of your view\r\n  - your current directory should have the new view in it (including dev and script directories and a whole lot more!)\r\n  - running `npm run build-dev && open dev/index.html` should load your default browser and if you look the source you should see an element with the class of `webapp-view-[your view name]`\r\n3. run `yo webapp-view:external` anywhere and check the external generator is run (see above)\r\n\r\n#### Any background context you want to provide?\r\nThe React views built by this generator are intended for use in our webapp-template based apps that we're beginning to build.\r\n\r\n#### What are the relevant tickets?\r\n[TAR-197](https://holidayextras.jira.com/browse/TAR-197)\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n#### What gif best describes how you feel about this work?\r\n![](http://media.giphy.com/media/YxMACiNIvfSc8/giphy.gif)\r\n---\r\n#### Quality checklist (for PR author to complete BEFORE code review):\r\n- [x] I've checked there is appropriate unit test coverage.\r\n- [x] I've checked there is appropriate selenium test coverage.\r\n- [x] I've included regression tests for any bug fixes.\r\n- [x] I've updated documentation with any changes to procedures.\r\n- [x] I've tested this on mobile Android, Safari, Chrome for any visual changes.\r\n- [x] I've tested this on desktop IE9/10/11, Firefox, Chrome for any visual changes.\r\n- [x] I've checked any significant visual changes with a member of the UX/UI pod.\r\n- [x] I've checked this work against the requirements of the Jira.\r\n- [x] I've added and updated translations for all supported languages\r\n- [x] I've informed those who need to know of any unforeseen impact of this work (database migrations, deployment procedure changes).\r\n- [x] I am ready for this to be code reviewed, merged and tested.\r\n- [x] I've thought about writing a blog post about this\r\n\r\n#### IP or Developer Review:\r\n- [ ] I agree with the assumptions made in the quality checklist.\r\n- [ ] I’ve witnessed the work behaving as expected.\r\n- [ ] I’ve run all the tests locally and they pass.\r\n- [ ] +1 from me!\r\n\r\n#### Software Engineer or Developer review:\r\n- [ ] I agree with the assumptions made in the quality checklist.\r\n- [x] I’ve witnessed the work behaving as expected.\r\n- [ ] I’ve run all the tests locally and they pass.\r\n- [ ] I’ve checked for appropriate test coverage.\r\n- [ ] I’ve checked for coding anti-patterns.\r\n- [x] I've checked this work against the requirements of the Jira.\r\n- [ ] +1 from me!\r\n\r\n#### Software Engineer or project guru review:\r\n- [ ] I agree with the assumptions made in the quality checklist.\r\n- [ ] I’ve witnessed the work behaving as expected.\r\n- [ ] I’ve run all the tests locally and they pass.\r\n- [ ] I’ve checked for appropriate test coverage.\r\n- [ ] I’ve checked for coding anti-patterns.\r\n- [ ] I don’t believe this work introduces unnecessary technical debt.\r\n- [ ] +1 from me!"},"comment":{"url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/comments/77882333","html_url":"https://github.com/holidayextras/generator-webapp-view/pull/3#issuecomment-77882333","issue_url":"https://api.github.com/repos/holidayextras/generator-webapp-view/issues/3","id":77882333,"user":{"login":"dancork","id":1881054,"avatar_url":"https://avatars.githubusercontent.com/u/1881054?v=3","gravatar_id":"","url":"https://api.github.com/users/dancork","html_url":"https://github.com/dancork","followers_url":"https://api.github.com/users/dancork/followers","following_url":"https://api.github.com/users/dancork/following{/other_user}","gists_url":"https://api.github.com/users/dancork/gists{/gist_id}","starred_url":"https://api.github.com/users/dancork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dancork/subscriptions","organizations_url":"https://api.github.com/users/dancork/orgs","repos_url":"https://api.github.com/users/dancork/repos","events_url":"https://api.github.com/users/dancork/events{/privacy}","received_events_url":"https://api.github.com/users/dancork/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T16:00:43Z","updated_at":"2015-03-09T16:00:43Z","body":"I think it's worth updating the readme. I found the installation instructions on here - relating to using npm link - more helpful. Especial as several people will be working from their dev copy.\r\n\r\nAlso think it's worth mentioning, though it may seem obvious, how to install yeoman. I just went on the website and used `npm install -g yo bower grunt-cli gulp`."}}