{"id":18581578,"url":"https://github.com/ember-codemods/ember-component-template-colocation-migrator","last_synced_at":"2025-04-10T11:35:23.320Z","repository":{"id":35946863,"uuid":"190739892","full_name":"ember-codemods/ember-component-template-colocation-migrator","owner":"ember-codemods","description":"A codemod for https://github.com/emberjs/rfcs/pull/481","archived":false,"fork":false,"pushed_at":"2025-03-18T04:27:40.000Z","size":201,"stargazers_count":16,"open_issues_count":5,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T05:26:06.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-codemods.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-07T12:28:25.000Z","updated_at":"2025-03-18T04:21:52.000Z","dependencies_parsed_at":"2022-08-30T02:10:18.640Z","dependency_job_id":null,"html_url":"https://github.com/ember-codemods/ember-component-template-colocation-migrator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-codemods%2Fember-component-template-colocation-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-codemods%2Fember-component-template-colocation-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-codemods%2Fember-component-template-colocation-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-codemods%2Fember-component-template-colocation-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-codemods","download_url":"https://codeload.github.com/ember-codemods/ember-component-template-colocation-migrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T00:06:10.791Z","updated_at":"2025-04-10T11:35:18.295Z","avatar_url":"https://github.com/ember-codemods.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-component-template-colocation\n\nThis codemod will co-locate component JS and HBS as described in the [Component Templates Co-location RFC](https://emberjs.github.io/rfcs/0481-component-templates-co-location.html).\n\n## Examples\n\n * [Travis CI](https://github.com/GavinJoyce/travis-web/pull/1)\n * [Ghost Admin](https://github.com/GavinJoyce/Ghost-Admin/pull/1)\n\n## Usage\n\nTo run the migrator on your app:\n\n```sh\ncd your/project/path\nnpx github:ember-codemods/ember-component-template-colocation-migrator\n```\n\n### Flat component structure\n\nBy default, the migrator changes the **classic** component structure to the **flat** component structure.\n\n```\nyour-project-name\n├── app\n│   └── components\n│       ├── foo-bar\n│       │   ├── baz.hbs\n│       │   └── baz.js\n│       ├── foo-bar.hbs\n│       └── foo-bar.js\n│   ...\n```\n\n### Nested component structure\n\nIf you want to change from **classic** to **nested**, you can add the `-ns` flag:\n\n```sh\ncd your/project/path\nnpx github:ember-codemods/ember-component-template-colocation-migrator -ns\n```\n\nThe nested component structure looks like:\n\n```\nyour-project-name\n├── app\n│   └── components\n│       └── foo-bar\n│           ├── baz\n│           │   ├── index.hbs\n│           │   └── index.js\n│           ├── index.hbs\n│           └── index.js\n│   ...\n```\n\n\n## Running Tests\n\nThe tests were inspired by [ember-module-migrator](https://github.com/ember-codemods/ember-module-migrator/blob/master/test/engines/classic-test.js).\n\nIf you are contributing to this codemod, please check that all tests pass by running,\n\n```sh\nyarn test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-codemods%2Fember-component-template-colocation-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-codemods%2Fember-component-template-colocation-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-codemods%2Fember-component-template-colocation-migrator/lists"}