{"id":22962078,"url":"https://github.com/actionanand/ng-my-libraries","last_synced_at":"2025-04-02T03:23:54.262Z","repository":{"id":36997128,"uuid":"505201684","full_name":"actionanand/ng-my-libraries","owner":"actionanand","description":"This repo has some of my basic angular libraries(npm publishable). It's using angular version 14.0.2. Some features like Function Types and Polymorphic Programming Without Class are used.","archived":false,"fork":false,"pushed_at":"2022-07-07T10:26:00.000Z","size":1592,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T18:17:29.235Z","etag":null,"topics":["angular-animations","angular-libraries","angular-library","angular14","function-typechecking","monorepo","ng-container","ng-template","ngtemplateoutlet","nx","polymorphic-programming"],"latest_commit_sha":null,"homepage":"https://actionanand.github.io/ng-my-libraries/","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/actionanand.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":"2022-06-19T19:31:09.000Z","updated_at":"2022-07-03T13:40:21.000Z","dependencies_parsed_at":"2022-06-29T07:02:22.695Z","dependency_job_id":null,"html_url":"https://github.com/actionanand/ng-my-libraries","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/actionanand%2Fng-my-libraries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fng-my-libraries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fng-my-libraries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionanand%2Fng-my-libraries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actionanand","download_url":"https://codeload.github.com/actionanand/ng-my-libraries/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246748389,"owners_count":20827307,"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-animations","angular-libraries","angular-library","angular14","function-typechecking","monorepo","ng-container","ng-template","ngtemplateoutlet","nx","polymorphic-programming"],"created_at":"2024-12-14T19:15:09.650Z","updated_at":"2025-04-02T03:23:54.247Z","avatar_url":"https://github.com/actionanand.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ng(Nx) Libraries\n\nThis project was generated using [Nx](https://nx.dev) - [Angular 14.0.2](https://blog.angular.io/angular-v14-is-now-available-391a6db736af)\n\n\u003c!-- \u003cp style=\"text-align: center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png\" width=\"450\"\u003e\u003c/p\u003e --\u003e\n\n## Libraries in this repo\n\nCode for the libraries of [@ng-ar/fa-input](https://www.npmjs.com/package/@ng-ar/fa-input), [@ng-ar/prime-input](https://www.npmjs.com/package/@ng-ar/prime-input), [@ng-ar/tab](https://www.npmjs.com/package/@ng-ar/tab), [@ng-ar/modal](https://www.npmjs.com/package/@ng-ar/modal) and [@ng-ar/mask](https://www.npmjs.com/package/@ng-ar/mask) are included in this repo.\n\n## How I created this repo\n\ninstalling NX globally\n\n```bash\nnpm install -g nx\n```\n\ncreating nx workspace with angular\n\n```bash\nnpx create-nx-workspace --preset=angular\n```\n\nrunning angular app in development\n\n```bash\nnx serve app-name\n```\n\nto see the files to be changed or created while creating component, use the flag `--dry-run`\n\n```bash\nnx g c home-page --project=project-name --dry-run\n```\n\n- [Getting started with NX and Angular](https://nx.dev/#getting-started)\n\n## Quick Start \u0026 Documentation\n\n[Nx Documentation](https://nx.dev/angular)\n\n[10-minute video showing all Nx features](https://nx.dev/getting-started/intro)\n\n[Interactive Tutorial](https://nx.dev/tutorial/01-create-application)\n\n## Adding capabilities to your workspace\n\nNx supports many plugins which add capabilities for developing different types of applications and different tools.\n\nThese capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.\n\nBelow are our core plugins:\n\n- [Angular](https://angular.io)\n  - `ng add @nrwl/angular`\n- [React](https://reactjs.org)\n  - `ng add @nrwl/react`\n- Web (no framework frontends)\n  - `ng add @nrwl/web`\n- [Nest](https://nestjs.com)\n  - `ng add @nrwl/nest`\n- [Express](https://expressjs.com)\n  - `ng add @nrwl/express`\n- [Node](https://nodejs.org)\n  - `ng add @nrwl/node`\n\nThere are also many [community plugins](https://nx.dev/community) you could add.\n\n## Generate an application\n\nRun `ng g @nrwl/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 @nrwl/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 `@nx-monorepo-practice/mylib`.\n\n## Generating publishable library in nx and publishing\n\n```bash\nng g @nrwl/angular:lib lib1 --publishable --importPath=\"@\u003corganization_name\u003e/lib1\"\n```\n\n```bash\nng g @nrwl/angular:lib lib1 --publishable --importPath=\"@\u003corganization_name\u003e/lib1\" --tags=\"scope:public,type:util,target:all\"\n```\n\n```bash\nng g @nrwl/angular:lib lib2 --publishable --importPath=\"lib2\"\n```\n\n- Building\n\n    ```bash\n    $ nx build lib1\n    $ nx build lib2\n    ```\n\n- You will find built and ready to publish versions in `dist/libs/lib1` and `dist/libs/lib2`. Now we ready to publish it to npm. You need to go to dist directory of your project\n\n    ```bash\n    cd /dist/libs/lib1\n    ```\n\n- Publishing\n\n    ```bash\n    npm publish --access public\n    ```\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 graph` to see a diagram of the dependencies of your projects.\n\n## Deploy to GitHub Pages\n\n1. To begin, add the `angular-cli-ghpages` builder.\n\n```bash\nng add angular-cli-ghpages\n```\n\n2. If you’re deploying the project to a Github project page you’ll need to set the `baseHref` property as the repository name. The `baseHref` will be used for all relative URLs on your site. You could specify the `baseHref` as part of the project architect deploy options in the `angular.json` file. Or just pass it as the `--base-href` flag to the `ng deploy` command. If you’re deploying the project to a Github user page, you do not need to set this option.\n\n```bash\nng deploy --base-href=/\u003crepository-name\u003e/\n```\n\nGitHub will automatically enable Pages when you push a gh-pages branch. There is no need to enable Pages from the repository settings.\n\n```bash\nng deploy --base-href=/ng-my-libraries/\n```\n\n3. Remove `angular-cli-ghpages` after deployemnt as it's not supporting `angular 14`.\n\n```bash\ngit stash -u \u0026\u0026 git stash drop\n```\n\n## Resources\n\n- [What’s New in Angular 14?](https://www.bacancytechnology.com/blog/whats-new-in-angular-14)\n- [Publishable libraries with Nx Monorepo - part 1](https://dev.to/agroupp/publishable-libraries-with-nx-monorepo-part-1-1ae)\n- [HOW TO DEPLOY NPM MODULES IN AN NX MONOREPO AND GITHUB ACTIONS?](https://yonatankra.com/how-to-deploy-npm-modules-in-an-nx-monorepo-and-github-actions/)\n- [How To Use Font Awesome icons in Angular Applications](https://www.angularjswiki.com/angular/how-to-use-font-awesome-icons-in-angular-applications/)\n- [TypeScript: Any | Unknown | Never](https://dev.to/ponikar/typescript-any-unknown-never-1idc)\n- [When to use `never` and `unknown` in TypeScript](https://blog.logrocket.com/when-to-use-never-and-unknown-in-typescript-5e4d6c5799ad/)\n- [Get an Enum Key by Value in TypeScript](https://bobbyhadz.com/blog/typescript-get-enum-key-by-value)\n- [Display IE ::ms-clear pseudo element in small input elements?](https://stackoverflow.com/questions/34745452/display-ie-ms-clear-pseudo-element-in-small-input-elements)\n- [Creating libraries - Official](https://angular.io/guide/creating-libraries)\n- [The Angular Library Series - Creating a Library with Angular CLI](https://medium.com/angular-in-depth/creating-a-library-in-angular-6-87799552e7e5)\n- [Create your Angular Library and linking](https://medium.com/@prajramesh93/create-your-angular-library-f2cf273fd8a5)\n- [Define a Type for Object with Dynamic keys in TypeScript](https://bobbyhadz.com/blog/typescript-object-with-dynamic-keys)\n\n## Further help\n\nVisit the [Nx Documentation](https://nx.dev/angular) to learn more.\n\n## ☁ Nx Cloud\n\n### Distributed Computation Caching \u0026 Distributed Task Execution\n\n\u003c!-- \u003cp style=\"text-align: center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png\"\u003e\u003c/p\u003e --\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.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fng-my-libraries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factionanand%2Fng-my-libraries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionanand%2Fng-my-libraries/lists"}