{"id":16406985,"url":"https://github.com/d-koppenhagen/schematics-helpers-playground","last_synced_at":"2025-07-21T16:32:48.748Z","repository":{"id":81667494,"uuid":"295166001","full_name":"d-koppenhagen/schematics-helpers-playground","owner":"d-koppenhagen","description":"This is a playground project related to my blog post \"Create Angular Schematics with common helpers\" and contains all the examples I described there.","archived":false,"fork":false,"pushed_at":"2021-05-19T19:20:05.000Z","size":562,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T22:51:09.985Z","etag":null,"topics":["angular","angular-cli","schematics"],"latest_commit_sha":null,"homepage":"https://d-koppenhagen.de/blog/2020-09-angular-schematics-common-helpers","language":"HTML","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/d-koppenhagen.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":"2020-09-13T14:15:45.000Z","updated_at":"2024-12-22T01:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a39a6b3-8c4c-4da3-b837-3f88a47b60ef","html_url":"https://github.com/d-koppenhagen/schematics-helpers-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d-koppenhagen/schematics-helpers-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-koppenhagen%2Fschematics-helpers-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-koppenhagen%2Fschematics-helpers-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-koppenhagen%2Fschematics-helpers-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-koppenhagen%2Fschematics-helpers-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-koppenhagen","download_url":"https://codeload.github.com/d-koppenhagen/schematics-helpers-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-koppenhagen%2Fschematics-helpers-playground/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266334405,"owners_count":23912964,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","angular-cli","schematics"],"created_at":"2024-10-11T06:11:42.421Z","updated_at":"2025-07-21T16:32:48.716Z","avatar_url":"https://github.com/d-koppenhagen.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Schematic Helpers Playground\n\nThis is a playground project related to my blog post [**Create Angular schematics with common helpers**](https://d-koppenhagen.de/blog/2020-09-angular-schematics-common-helpers) and contains all the examples I described there.\n\n## Play around\n\nThis repo contains basically two sub-projects:\n\n1. The actual Angular schematic playground project ([`./playground`](./playground))\n2. An Angular workspace (example project) to run the schematic against an existing Angular workspace ([`./test-workspace`](./test-workspace))\n\nTo get all the things running, follow the steps below:\n\n```bash\ncd playground            # go into the schematics project\nnpm i                    # install / update dependencies\nnpm run build -- --watch # build the schematics and watch for changes\n```\n\nAn then open another terminal / tab and run:\n\n```bash\n# install the schematics globally so the `schematics` command becomes available\nnpm i -g @angular-devkit/schematics-cli\ncd test-workspace # go into the angular workspace\nnpm i             # install / update dependencies\n# run the schematic 'playground' (see list below)\nschematics ../playground/src/collection.json:playground\n```\n\n## The examples\n\nAll the example schematics are executed / build as described in the section above.\nThe examples are related to my blog post [**Create Angular schematics with common helpers**](https://d-koppenhagen.de/blog/2020-09-angular-schematics-common-helpers).\n\nTo execute and check a specific helper functions from the examples in the blog post, simply use the appropriate schematic name for execution (`collection.json:\u003cNAME\u003e`).\nThe Table below shows you an overview of the available examples:\n\n| schematic name   | Description                                                                                 |\n| ---------------- | --------------------------------------------------------------------------------------------|\n| `playground`     | Just logs that everything works.                                                            |\n| `dependencies`   | Helpers for dependency operations.                                                          |\n| `insert`         | Helpers for insert operations.                                                              |\n| `relative-path`  | A helper for determining the relative path to the project root.                             |\n| `import`         | A helper for adding import statements.                                                      |\n| `module`         | Modify `NgModule`s.                                                                         |\n| `config`         | Work with then `angular.json` configuration.                                                |\n| `workspace`      | A helper to retrieve a projects default path in the workspace.                              |\n| `ng-add`         | Call another schematic.                                                                     |\n| `ng-new`         | Execute `ng new` with predefined options and run other stuff and run the `ng-add` schematic |\n\n\u003e Running the schematics locally — by default — just changes on the virtual representation of the target Angular workspace.\n\u003e To apply the changes on the real workspace, you need to pass the flag `--debug=false` through the `schematics` command.\n\n## Steps to set up this playground manually\n\n```bash\nmkdir schematics-helpers-playground\ncd schematics-helpers-playground\nnpx @angular/cli new test-workspace --routing --style=css\nnpx @angular-devkit/schematics-cli blank --name=playground\ncd playground\nnpm i --save @schematics/angular\ncd ../test-workspace\nng g lib my-lib\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-koppenhagen%2Fschematics-helpers-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-koppenhagen%2Fschematics-helpers-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-koppenhagen%2Fschematics-helpers-playground/lists"}