{"id":20646125,"url":"https://github.com/joefiorini/ember-cli-app-plugin-example","last_synced_at":"2025-03-09T15:59:16.340Z","repository":{"id":18504044,"uuid":"21700369","full_name":"joefiorini/ember-cli-app-plugin-example","owner":"joefiorini","description":null,"archived":false,"fork":false,"pushed_at":"2014-07-10T15:54:57.000Z","size":116,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T09:36:37.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/joefiorini.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-07-10T15:54:52.000Z","updated_at":"2015-11-20T07:56:55.000Z","dependencies_parsed_at":"2022-07-30T14:09:21.476Z","dependency_job_id":null,"html_url":"https://github.com/joefiorini/ember-cli-app-plugin-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefiorini%2Fember-cli-app-plugin-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefiorini%2Fember-cli-app-plugin-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefiorini%2Fember-cli-app-plugin-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joefiorini%2Fember-cli-app-plugin-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joefiorini","download_url":"https://codeload.github.com/joefiorini/ember-cli-app-plugin-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242714052,"owners_count":20173581,"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-16T16:24:03.612Z","updated_at":"2025-03-09T15:59:16.312Z","avatar_url":"https://github.com/joefiorini.png","language":"JavaScript","readme":"# Ember CLI App as Plugin\n\nThis repo shows an example of installing an ember-cli app as a plugin within another ember-cli app.\n\nThanks to @rondale-sc for starting this work in https://github.com/rondale-sc/ember-cli-super-number.\n\n## Prerequisite Reading\n\nFirst off, if you aren't familiar with how ember-cli addons work, make sure you read [DockYard's post on the topic](https://github.com/rondale-sc/ember-cli-super-number).\n\n## Structure\n\n`host-app`\n\nThis is the primary app that pulls in code from the plugin.\n\n`plugin-app`\n\nThis is the app that contains extracted code. Using the pod layout, we can safely namespace routes, controllers \u0026 views inside our plugin. Templates don't work in the pod structure yet because ember-cli insists on putting them under a `templates` folder, thus making the final module path `host-app/templates/my-plugin/template`, while the resolver's pod support is looking for `host-app/my-plugin/template`. Is this filed as an issue on ember-cli yet?\n\n## Relevant Files\n\n`plugin-app/index.js`\n\nThis is the file that ember-cli runs when it sees the addon. It will call `treeFor` with various folder names.\n\n`plugin-app/app/my-plugin/route.js`\n\nThe pod structure giving us nice namespacing within our plugin. Of course, we can have more than one pod in here and ember-cli will include them all.\n\n`plugin-app/app/templates/my-plugin.hbs`\n\nThe template for the aforementioned pod. Normally this would be in `my-plugin/template.hbs` instead, but see the above note on the ember-cli bug forcing us to do this.\n\n`host-app/app/router.js`\n\nNote the inclusion of the route:\n\n```\nthis.route('my-plugin', {path: 'plugin'});\n```\n\nThis will include the route from the plugin, but still allow us to customize the path.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoefiorini%2Fember-cli-app-plugin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoefiorini%2Fember-cli-app-plugin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoefiorini%2Fember-cli-app-plugin-example/lists"}