{"action":"created","issue":{"url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/14","repository_url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts","labels_url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/14/comments","events_url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/14/events","html_url":"https://github.com/TechnologyAdvice/ta-scripts/pull/14","id":138043325,"number":14,"title":"Indexr, recursive auto index","user":{"login":"levithomason","id":5067638,"avatar_url":"https://avatars.githubusercontent.com/u/5067638?v=3","gravatar_id":"","url":"https://api.github.com/users/levithomason","html_url":"https://github.com/levithomason","followers_url":"https://api.github.com/users/levithomason/followers","following_url":"https://api.github.com/users/levithomason/following{/other_user}","gists_url":"https://api.github.com/users/levithomason/gists{/gist_id}","starred_url":"https://api.github.com/users/levithomason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levithomason/subscriptions","organizations_url":"https://api.github.com/users/levithomason/orgs","repos_url":"https://api.github.com/users/levithomason/repos","events_url":"https://api.github.com/users/levithomason/events{/privacy}","received_events_url":"https://api.github.com/users/levithomason/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-03T01:08:34Z","updated_at":"2016-03-03T01:34:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/pulls/14","html_url":"https://github.com/TechnologyAdvice/ta-scripts/pull/14","diff_url":"https://github.com/TechnologyAdvice/ta-scripts/pull/14.diff","patch_url":"https://github.com/TechnologyAdvice/ta-scripts/pull/14.patch"},"body":"### `$ ta-script lib/indexr ./src`\r\n\r\n### Features\r\n\r\n- Accepts a single directory argument.\r\n- Recursively creates `index.js` files in every directory of that has `*.js` files.\r\n- Only directories with `*.js` files get an `index.js`.\r\n- `index.js` files without the `/* @indexr */` flag are never touched.\r\n- `index.js` files in directories with no `*.js` files are auto removed.\r\n\r\n\r\n### Example\r\n\r\nGiven:\r\n\r\n```\r\n/src\r\n  /components\r\n    avatar.js\r\n  /utils\r\n    count.js\r\n    scrap.js\r\n```\r\n\r\nRunning `ta-script lib/indexr src` yields:\r\n\r\n```\r\n/src\r\n  /components\r\n    index.js\r\n    avatar.js\r\n  /utils\r\n    index.js\r\n    count.js\r\n    scrap.js\r\n```\r\n\r\nWhere `index.js` files looks like this:\r\n\r\n```js\r\n/* @indexr */\r\n/* eslint-disable */\r\n\r\nimport count from './count'\r\nimport scrap from './scrap'\r\n\r\nconst defaultExport = {\r\n  count,\r\n  scrap,\r\n}\r\n\r\nexport default defaultExport\r\n```"},"comment":{"url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/comments/191530133","html_url":"https://github.com/TechnologyAdvice/ta-scripts/pull/14#issuecomment-191530133","issue_url":"https://api.github.com/repos/TechnologyAdvice/ta-scripts/issues/14","id":191530133,"user":{"login":"levithomason","id":5067638,"avatar_url":"https://avatars.githubusercontent.com/u/5067638?v=3","gravatar_id":"","url":"https://api.github.com/users/levithomason","html_url":"https://github.com/levithomason","followers_url":"https://api.github.com/users/levithomason/followers","following_url":"https://api.github.com/users/levithomason/following{/other_user}","gists_url":"https://api.github.com/users/levithomason/gists{/gist_id}","starred_url":"https://api.github.com/users/levithomason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levithomason/subscriptions","organizations_url":"https://api.github.com/users/levithomason/orgs","repos_url":"https://api.github.com/users/levithomason/repos","events_url":"https://api.github.com/users/levithomason/events{/privacy}","received_events_url":"https://api.github.com/users/levithomason/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T01:34:45Z","updated_at":"2016-03-03T01:34:45Z","body":"I'm wondering if this should've been a separate lib now."}}