{"id":23046363,"url":"https://github.com/pfecht/generator-angular-polymer-demo","last_synced_at":"2025-04-03T02:21:28.166Z","repository":{"id":93993005,"uuid":"87538714","full_name":"pfecht/generator-angular-polymer-demo","owner":"pfecht","description":"A project based on angular-cli which demonstrates the usage of https://github.com/pfecht/generator-angular-polymer","archived":false,"fork":false,"pushed_at":"2017-04-12T07:53:18.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T16:30:10.497Z","etag":null,"topics":["angular-polymer-demo","generator-angular-polymer"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/pfecht.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-07T11:25:05.000Z","updated_at":"2017-04-19T11:50:51.000Z","dependencies_parsed_at":"2023-04-24T21:47:32.694Z","dependency_job_id":null,"html_url":"https://github.com/pfecht/generator-angular-polymer-demo","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/pfecht%2Fgenerator-angular-polymer-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfecht%2Fgenerator-angular-polymer-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfecht%2Fgenerator-angular-polymer-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfecht%2Fgenerator-angular-polymer-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfecht","download_url":"https://codeload.github.com/pfecht/generator-angular-polymer-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922665,"owners_count":20855430,"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":["angular-polymer-demo","generator-angular-polymer"],"created_at":"2024-12-15T21:31:43.348Z","updated_at":"2025-04-03T02:21:28.145Z","avatar_url":"https://github.com/pfecht.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo for generator-angular-polymer\nThis project demonstrates the basic usage of [generator-angular-polymer](https://github.com/pfecht/generator-angular-polymer) for [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0.\n\n## Getting started\n1. Install [generator-angular-polymer](https://github.com/pfecht/generator-angular-polymer).\n2. Get the code: ```git clone https://github.com/pfecht/generator-angular-polymer-demo.git```.\n3. Install the dependencies: run ```npm install```.\n4. Install Polymer elements: run `bower install` in `src/assets/`\n5. Run the generator: `yo angular-polymer` in the project root directory.\n6. Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Project Structure \n\n### Integration of Polymer\nPolymer and its elements are located in `src/assets/`:\n\n1. The core library and external elements are managed with bower.\n2. `components/` contains custom Polymer elements.\n3. `elements.html` sums up all Polymer elements which should be part of the application.\n\nTo integrate them in angular-cli, `elements.html` is included in two files:\n1. `src/index.html` to add them to the Angular application\n2. `.yo-rc.json` to configure them for the generator.\n\nFinally, the `angular-cli.json` has been changed to add the polyfill:\n```\n{\n  ...\n  \"apps\": [\n    {\n      ...\n      \"scripts\": [\n        \"assets/bower_components/webcomponentsjs/webcomponents-lite.min.js\"\n      ]\n      ...\n}\n\n```\n\n### Integration of generator-angular-polymer\nThe generator is configured in `.yo-rc-json` and automatically recreates the directives since he is part of the `package.json`:\n```\n\"scripts\": {\n  \"ng\": \"ng\",\n  \"start\": \"yo angular-polymer \u0026\u0026 ng serve\",\n  ...\n},\n```\n\n`src/app/shared/polymer-elements/` contains the generated directives.\n\n`AppModule` (src/app/app.module.ts) includes the generated directives:\n```\n...\nimport { POLYMER_ELEMENTS } from './shared/polymer-elements/index';\n\n@NgModule({\n  declarations: [\n    ...\n    POLYMER_ELEMENTS\n  ],\n  ...\n})\nexport class AppModule { }\n```\n\n## License\nApache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfecht%2Fgenerator-angular-polymer-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfecht%2Fgenerator-angular-polymer-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfecht%2Fgenerator-angular-polymer-demo/lists"}