|
| 1 | +# AngularArchitects |
| 2 | + |
| 3 | +This project was generated using [Nx](https://nx.dev). |
| 4 | + |
| 5 | +<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png" width="450"></p> |
| 6 | + |
| 7 | +🔎 **Nx is a set of Extensible Dev Tools for Monorepos.** |
| 8 | + |
| 9 | +## Adding capabilities to your workspace |
| 10 | + |
| 11 | +Nx supports many plugins which add capabilities for developing different types of applications and different tools. |
| 12 | + |
| 13 | +These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well. |
| 14 | + |
| 15 | +Below are some plugins which you can add to your workspace: |
| 16 | + |
| 17 | +- [React](https://reactjs.org) |
| 18 | + - `npm install --save-dev @nrwl/react` |
| 19 | +- Web (no framework frontends) |
| 20 | + - `npm install --save-dev @nrwl/web` |
| 21 | +- [Angular](https://angular.io) |
| 22 | + - `npm install --save-dev @nrwl/angular` |
| 23 | +- [Nest](https://nestjs.com) |
| 24 | + - `npm install --save-dev @nrwl/nest` |
| 25 | +- [Express](https://expressjs.com) |
| 26 | + - `npm install --save-dev @nrwl/express` |
| 27 | +- [Node](https://nodejs.org) |
| 28 | + - `npm install --save-dev @nrwl/node` |
| 29 | + |
| 30 | +## Generate an application |
| 31 | + |
| 32 | +Run `nx g @nrwl/react:app my-app` to generate an application. |
| 33 | + |
| 34 | +> You can use any of the plugins above to generate applications as well. |
| 35 | +
|
| 36 | +When using Nx, you can create multiple applications and libraries in the same workspace. |
| 37 | + |
| 38 | +## Generate a library |
| 39 | + |
| 40 | +Run `nx g @nrwl/react:lib my-lib` to generate a library. |
| 41 | + |
| 42 | +> You can also use any of the plugins above to generate libraries as well. |
| 43 | +
|
| 44 | +Libraries are sharable across libraries and applications. They can be imported from `@angular-architects/mylib`. |
| 45 | + |
| 46 | +## Development server |
| 47 | + |
| 48 | +Run `nx 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. |
| 49 | + |
| 50 | +## Code scaffolding |
| 51 | + |
| 52 | +Run `nx g @nrwl/react:component my-component --project=my-app` to generate a new component. |
| 53 | + |
| 54 | +## Build |
| 55 | + |
| 56 | +Run `nx 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. |
| 57 | + |
| 58 | +## Running unit tests |
| 59 | + |
| 60 | +Run `nx test my-app` to execute the unit tests via [Jest](https://jestjs.io). |
| 61 | + |
| 62 | +Run `nx affected:test` to execute the unit tests affected by a change. |
| 63 | + |
| 64 | +## Running end-to-end tests |
| 65 | + |
| 66 | +Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io). |
| 67 | + |
| 68 | +Run `nx affected:e2e` to execute the end-to-end tests affected by a change. |
| 69 | + |
| 70 | +## Understand your workspace |
| 71 | + |
| 72 | +Run `nx dep-graph` to see a diagram of the dependencies of your projects. |
| 73 | + |
| 74 | +## Further help |
| 75 | + |
| 76 | +Visit the [Nx Documentation](https://nx.dev) to learn more. |
0 commit comments