{"id":15285606,"url":"https://github.com/dsi-hug/ngx-schematics-utilities","last_synced_at":"2026-03-04T19:02:43.991Z","repository":{"id":41744098,"uuid":"431196982","full_name":"DSI-HUG/ngx-schematics-utilities","owner":"DSI-HUG","description":"🚀 Useful utilities for Angular Schematics","archived":false,"fork":false,"pushed_at":"2025-04-03T15:53:43.000Z","size":8421,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-03T16:34:28.763Z","etag":null,"topics":["angular","angular-cli","angular-devkit","ast","blueprints","code-generation","devkit","helpers","scaffolding","schematics","sdk","template","tooling","tools","typescript","utilities","utils"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DSI-HUG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-11-23T17:39:07.000Z","updated_at":"2025-04-03T15:53:39.000Z","dependencies_parsed_at":"2022-08-20T07:40:22.612Z","dependency_job_id":"a009a39a-a1ba-424b-87ed-55011580428e","html_url":"https://github.com/DSI-HUG/ngx-schematics-utilities","commit_stats":{"total_commits":165,"total_committers":4,"mean_commits":41.25,"dds":"0.048484848484848464","last_synced_commit":"b66a526f5078bad13be3fdc30efb21d62a25b2dd"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-schematics-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-schematics-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-schematics-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-schematics-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DSI-HUG","download_url":"https://codeload.github.com/DSI-HUG/ngx-schematics-utilities/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657851,"owners_count":21140843,"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","angular-cli","angular-devkit","ast","blueprints","code-generation","devkit","helpers","scaffolding","schematics","sdk","template","tooling","tools","typescript","utilities","utils"],"created_at":"2024-09-30T15:06:41.853Z","updated_at":"2026-03-04T19:02:43.936Z","avatar_url":"https://github.com/DSI-HUG.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    @hug/ngx-schematics-utilities\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://www.hug.ch\"\u003e\n        \u003cimg src=\"https://cdn.hug.ch/svgs/hug/hug-logo-horizontal.svg\" alt=\"hug-logo\" height=\"54px\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n    \u003ci\u003eUseful utilities for Angular Schematics\u003c/i\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@hug/ngx-schematics-utilities\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/@hug/ngx-schematics-utilities.svg?color=blue\u0026logo=npm\" alt=\"npm version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmcharts.com/compare/@hug/ngx-schematics-utilities?minimal=true\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/dw/@hug/ngx-schematics-utilities.svg?color=blue\u0026logo=npm\" alt=\"npm donwloads\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-schematics-utilities/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-GPLv3-ff69b4.svg\" alt=\"license GPLv3\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://dsi-hug.github.io/ngx-schematics-utilities\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/docs-site-blue\" alt=\"docs-site\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-schematics-utilities/actions/workflows/ci_tests.yml\"\u003e\n        \u003cimg src=\"https://github.com/dsi-hug/ngx-schematics-utilities/actions/workflows/ci_tests.yml/badge.svg\" alt=\"build status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-schematics-utilities/blob/main/CONTRIBUTING.md#-submitting-a-pull-request-pr\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr/\u003e\n\n#### Schematics\n\n\u003e Schematics are generators that transform an existing filesystem.\u003cbr /\u003e\n\u003e They can create files, refactor existing files, or move files around.\n\n[More info][schematics]\n\n## Getting started\n\nThis library provide a large set of utilities that can be used while developing a schematic for Angular.\n\n👉 Learn about it on the 📚 [docs site][docs-site].\n\n#### Example\n\n![preview](preview.gif \"Preview\")\n\n```ts\nexport default (options: MySchematicOptions): Rule =\u003e\n  schematic('my-schematic', [\n    modifyJsonFile('tsconfig.json', ['compilerOptions', 'strict'], true),\n    rule((tree, context): Rule =\u003e {\n      ... return renameFile('old-file', 'new-file');\n      ... return chain([]);\n      ... return noop();\n    }),\n\n    workspace()\n      .spawn('ng', ['add', '@angular/material', '--skip-confirmation'])\n      .addPackageJsonDevDependencies(['eslint'])\n      .packageInstallTask()\n      .logInfo('Doing some cool stuff')\n      .isAngularVersion('\u003c= 11', (): Rule =\u003e {\n        ...\n      })\n      .toRule(),\n\n    application(options.project)\n      .deployFiles(options)\n      .addProviderToBootstrapApplication('__MAIN__', 'provideAnimations()', '@angular/platform-browser/animations'),\n      .addImportToFile('__SRC__/file.ts', 'environment', './environments/environment')\n      .deleteFiles(['karma.conf.js'])\n      .rule(({ project }: ChainableApplicationContext) =\u003e {\n        return createOrUpdateFile(project.pathFromRoot('README.md'), project.name);\n      })\n      .toRule(),\n\n    library(options.project)\n      .downloadFile('https://my-cdn.com/icons/icon.png', '__SRC__/assets/icons/icon.png')\n      .toRule(),\n\n    runAtEnd(logAction('Have a look at `./package.json` file and make modifications as needed.'))\n\n  ], options);\n```\n\n## Development\n\nSee the [developer docs][developer].\n\n## Contributing\n\n#### \u003e Want to Help?\n\nWant to file a bug, contribute some code or improve documentation? Excellent!\n\nBut please read up first on the guidelines for [contributing][contributing], and learn about submission process, coding rules and more.\n\n#### \u003e Code of Conduct\n\nPlease read and follow the [Code of Conduct][codeofconduct], and help us keep this project open and inclusive.\n\n## Credits\n\nCopyright (C) 2021 [HUG - Hôpitaux Universitaires Genève][dsi-hug]\n\n[![love@hug](https://img.shields.io/badge/@hug-%E2%9D%A4%EF%B8%8Flove-magenta)][dsi-hug]\n\n[developer]: https://github.com/dsi-hug/ngx-schematics-utilities/blob/main/DEVELOPER.md\n[contributing]: https://github.com/dsi-hug/ngx-schematics-utilities/blob/main/CONTRIBUTING.md\n[codeofconduct]: https://github.com/dsi-hug/ngx-schematics-utilities/blob/main/CODE_OF_CONDUCT.md\n[dsi-hug]: https://github.com/dsi-hug\n[schematics]: https://angular.io/guide/schematics\n[docs-site]: https://dsi-hug.github.io/ngx-schematics-utilities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Fngx-schematics-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsi-hug%2Fngx-schematics-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Fngx-schematics-utilities/lists"}