깜놀하는 해므찌로

Angular create apps within NX NX 레포 내부에 새로운 프로젝트 추가하기 feat.client 본문

IT

Angular create apps within NX NX 레포 내부에 새로운 프로젝트 추가하기 feat.client

agnusdei1207 2023. 7. 28. 11:28
반응형
SMALL

1. NX 모노레포를 활용하기 위해 클라이언트 즉, 프론테엔드 단을 프로젝트 내에 위 이미지처럼 추가해 보겠습니다.

 

 npx nx generate @nx/angular:application client --directory=apps/client --routing --standalone --addTailwind --no-interactive --dry-run

2. 명령어 상세 설명

- `npx`: This is a command-line utility that allows you to run locally installed Node.js packages.
- `nx`: It refers to the Nx CLI tool used for managing projects within a monorepo.

Command Options: 옵션
- `generate`: This is the command to generate new code or artifacts within the Nx workspace.
- `@nx/angular:application`: This specifies the schematic or generator to be used, in this case, the `application` schematic from the `@nx/angular` collection.
- `client`: This is the name given to the generated application.
- `--directory=apps/client`: This option specifies the target directory for the generated application. In this case, the application will be created within the `apps/client` directory.
- `--routing`: This option enables the generation of a routing module for the application.
- `--standalone`: This option generates the application as a standalone project, independent of any other applications or libraries within the Nx workspace.
- `--addTailwind`: This option adds Tailwind CSS support to the generated application.
- `--no-interactive`: This option disables interactive prompts during the generation process, making it suitable for automated or scripted execution.
- `--dry-run`: This option performs a dry run, which means the command will simulate the generation process without making any actual changes to the file system. This is useful for previewing the changes that will be made.

By running this command with the specified options, you can simulate the generation of an Angular application named "client" with routing, Tailwind CSS support, and other configurations within the "apps/client" directory of your Nx workspace.

 

 

반응형
LIST