{"id":25002094,"url":"https://github.com/cognizone/ng-cognizone","last_synced_at":"2025-03-17T16:13:16.305Z","repository":{"id":40465731,"uuid":"383058471","full_name":"cognizone/ng-cognizone","owner":"cognizone","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-24T23:09:10.000Z","size":19711,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-08T02:32:37.099Z","etag":null,"topics":["angular","monorepo","typescript"],"latest_commit_sha":null,"homepage":"https://cognizone.github.io/ng-cognizone/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cognizone.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-05T07:51:18.000Z","updated_at":"2025-02-24T21:56:35.000Z","dependencies_parsed_at":"2024-05-28T11:26:12.715Z","dependency_job_id":"d547f1ca-921c-44b5-807f-0fd7c8ef7e19","html_url":"https://github.com/cognizone/ng-cognizone","commit_stats":{"total_commits":416,"total_committers":6,"mean_commits":69.33333333333333,"dds":0.5,"last_synced_commit":"798327da7a858036fca2b076cd578dfabb43268b"},"previous_names":[],"tags_count":212,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cognizone%2Fng-cognizone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cognizone%2Fng-cognizone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cognizone%2Fng-cognizone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cognizone%2Fng-cognizone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cognizone","download_url":"https://codeload.github.com/cognizone/ng-cognizone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022628,"owners_count":20385133,"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","monorepo","typescript"],"created_at":"2025-02-04T21:23:45.619Z","updated_at":"2025-03-17T16:13:16.300Z","avatar_url":"https://github.com/cognizone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ng-Cognizone\n\n## Generate an application\n\nRun `ng g @nx/angular:app my-app` to generate an application.\n\n\u003e You can use any of the plugins above to generate applications as well.\n\nWhen using Nx, you can create multiple applications and libraries in the same workspace.\n\n## Generate a library\n\nRun `ng g @nx/angular:lib my-lib` to generate a library.\n\n\u003e You can also use any of the plugins above to generate libraries as well.\n\nLibraries are shareable across libraries and applications. They can be imported from `@cognizone/mylib`.\n\n`nx generate @nx/angular:library \u003cLIB_NAME\u003e --buildable --publishable --importPath=\"@cognizone/\u003cLIB_NAME\u003e\"`\n\n## Developing in an external app\n\nChances are, you're adding a feature or resolving a bug for an app, so here is how to \"connect\" the lib dev to the actual app.\n\n- copy the file `tools\\link-lib\\start-lib.config.example.json` and name that copy `tasks\\start-lib.config.json`. You can adapt this file as follow:\n\n```jsonc\n{\n  \"appPath\": \"E:/your/project/path/frontend\", // absolute path to the root of the frontend app you're working on\n  \"libs\": [\"legi-shared\"] // the list of libs you are currently working on, those are the name of the folders inside /projects/libs\n}\n```\n\n- First, make sure to disable cache in your project, under your project's directory, run `ng config cli.cache.enabled false`\n\n- Now you can open 2 terminals in the root of the lib, and you will run both `npm run start:build` and `npm run start:sync`\n-\n- Once the npm run start:build has stabilized, you can run your classic `npm start` in your favorite app, it was already running\n\n- make sure to stop/restart your `npm start` every time you need to update your project with latest changes\n\nAnd there you have it, now make sure to restart your project compiler whenever you make changes in library\n\n## Development server\n\nRun `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng g component my-component --project=my-app` to generate a new component.\n\n## Build\n\nRun `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io).\n\nRun `nx affected:test` to execute the unit tests affected by a change.\n\n## Running end-to-end tests\n\nRun `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).\n\nRun `nx affected:e2e` to execute the end-to-end tests affected by a change.\n\n## Understand your workspace\n\nRun `nx dep-graph` to see a diagram of the dependencies of your projects.\n\n## Further help\n\nVisit the [Nx Documentation](https://nx.dev/angular) to learn more.\n\n## ☁ Nx Cloud\n\n### Computation Memoization in the Cloud\n\n\u003cp style=\"text-align: center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png\"\u003e\u003c/p\u003e\n\nNx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.\n\nTeams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.\n\nVisit [Nx Cloud](https://nx.app/) to learn more.\n\n## Migrating from v4 to v5\n\n- Minimal Angular version is now 18\n- `onDestroy$` now uses `DestroyRef` instead od hacking into the `ngOnDestroy` lifecycle method. This means that all classes that extends `OnDestroy$` need to remove their call to `super.ngOnDestroy()`,\n- `OnDestroyMixin` has been removed as it was never used as-is in the end, only through the `OnDestroy$` class.\n\n## Migrating from v3 to v4\n\n- Minimal Angular version is now 16\n- Transloco has been moved from @ngneat/transloco to @jsverse/transloco. A simple find -and-relace + upgrade to v7 of those libs should be enough. Also the wai the module is setup needs to change, see official docs for the [main module](https://jsverse.github.io/transloco/docs/getting-started/installation?app-type=ng-module) and the [locale one](https://jsverse.github.io/transloco/docs/plugins/locale?app-type=ng-module).\n- The `NgModule` of `@cognizone/i18n-transloco` has been removed in favour of the `provideI18nTransloco` function that can be imported in a similar way. See that lib's [readme](./libs/i18n-transloco/README.md) for how to import it.\n\n## Migrating from v3.11 to v3.12\n\n- `@cognizone/json-ld/core`, `@cognizone/lod/core` and `@cognizone/shacl/core` respectively moved to dedicated packages `@cognizone/json-ld-core`, `@cognizone/lod-core` and `@cognizone/shacl-core`.\n- A few duplicate entities from `@cognizone/shacl` have been removed in favour of their `@cognizone/shacl-core` equivalent\n- Removed `Memoizer` from `@cognizone/shacl-core`, now it is only available through `@cognizone/shacl`\n\n## Migrating from v3.8 to v3.9\n\n- json-ld, lod and shacl libs have new core and/or ng-core sub entry points. This was made it so that \\*/core one don't depend on Angular artifacts, so that they can be used in NodeJs environments. When migrating, it will just require to change a few imports\n\n## Migrating from v3.6 to v3.7\n\n- json-model: `IdGenerator` as been removed, need to use `UriGenerator` from `@cognizone/lod` instead. Be sure to properly configure the `newUriPrefix` option.\n- json-model: `PrefixCcService` as been removed, need to use `PrefixService` from `@cognizone/lod` instead. If you are using json model, you will most likely want to initialize the context of PrefixService with something like this\n\n```ts\ninject(PrefixService).setContext({ prefix: KNOWN_PREFIXES }); // KNOWN_PREFIXES coming from @cognizone/lod\n```\n\n## Migrating from v3.3 to v3.4\n\n- cz-select: to pass a dedicated ngTemplate to display options, need to give it the #optionTpl identifier to not overlap with cz-label transclusion when used.\n\n## Migrating from v2 to v3\n\n- JsonModel and related types, services and utilities have been moved to @cognizone/json-model, so this library need to be added and imports need to be adapted\n- `JsonModel::@context` is now typed as `TypedResourceContext`, which is completely different from the previous typing. If ever you were using `rootUri` or `isNew`, you will need to find another way to get that info.\n- `RootUriDirective::apName` has been removed and doesn't need to be set anymore. This is because GraphService::setGraph was already taking apName/definition as argument, and so it was redundant to duplicate this information in this directive.\n- `RootUriDirective::getWrapper` has been deprecated. Instead, it's advised to inject `UrisStoreService` instead which has the same method and functionalities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcognizone%2Fng-cognizone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcognizone%2Fng-cognizone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcognizone%2Fng-cognizone/lists"}