forked from nrwl/nx
-
Notifications
You must be signed in to change notification settings - Fork 1
Workspace Organization
Jason Jean edited this page Nov 23, 2018
·
1 revision
This page goes through the workspace organization and it's benefits and intended usage.
The Nx Workspace has quite a few more tsconfig
files than a usual Angular CLI project. This section goes through and describes each one.
apps
└ app1
└ tsconfig.json (Local Tsconfig)
└ tsconfig.app.json (App Tsconfig)
└ tsconfig.spec.json (Spec Tsconfig)
└ app1-e2e
└ tsconfig.json (Local Tsconfig)
└ tsconfig.e2e.json (E2e Tsconfig)
libs
└ lib1
└ tsconfig.json (Local Tsconfig)
└ tsconfig.lib.json (Lib Tsconfig)
└ tsconfig.spec.json (Spec Tsconfig)
tools
└ tsconfig.tools.json (Tools Tsconfig)
tsconfig.json (Root Tsconfig)
- Root Tsconfig
- This is the main tsconfig that every tsconfig extends. Generally, these settings affect the whole workspace and is a good place to put organization wide configuration.
- Main responsibilities:
- Set organization-wide configuration
- Set typescript path mappings to libraries
- Local Tsconfigs
- This is a tsconfig in every project root. This file is read by editors as they traverse upwards.
- This tsconfig serves as a summary of the types which are being used by each project both for source code and/or testing code.
- Main Responsibility:
- Tell the IDE which types are being used in each project
- App and Lib Tsconfigs
- These tsconfigs are meant for the build system. These define how your application or library should be compiled.
- Main Responsibilities:
- Define application build specific configuration
- Define application source code typings (Not testing types)
- Define which files should be included in the application build
- Spec Tsconfigs
- These tsconfigs are meant for the unit test runner. These define how your project's tests should be compiled.
- Main Responsibilities:
- Define application testing specific configuration
- Define application testing code typings (Not application types)
- Define which files should be included in the application build
- E2E Tsconfigs
- These tsconigs are meant for the e2e test runner. These define how your project's e2e tests should be compiled.
- Main Responsibilities:
- Define e2e test specific configuration
- Define e2e testing code typings
- Define which files should be included when compiling E2E tests.
- Tools Tsconfig
- This tsconfig is meant for the tools directory. This defines how the tools should be compiled.
- Main Responsibility
- Define tools specific configuration
- Define tools code typings
- Define which file should be included when comiling Tools