- The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell
- npm install -g @angular/cli
- Online help is available on the command line
- ng help
- ng generate –help
- To create, build, and serve a new, basic Angular project on a development server
- ng new my-first-project
- cd my-first-project
- ng serve
COMMAND |
ALIAS |
DESCRIPTION |
|
Adds support for an external library to your project. |
|
|
Configures the gathering of Angular CLI usage metrics |
|
b |
Compiles an Angular app into an output directory named dist/ at the given output path. Must be executed from within a workspace directory. |
|
|
Retrieves or sets Angular configuration values in the angular.json file for the workspace. |
|
|
Invokes the deploy builder for a specified project or for the default project in the workspace. |
|
d |
Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword. |
|
e |
Builds and serves an Angular app, then runs end-to-end tests using Protractor. |
|
i18n-extract xi18n |
Extracts i18n messages from source code. |
|
g |
Generates and/or modifies files based on a schematic. |
|
|
Lists available commands and their short descriptions. |
|
l |
Runs linting tools on Angular app code in a given project folder. |
|
n |
Creates a new workspace and an initial Angular application. |
|
|
Runs an Architect target with an optional custom builder configuration defined in your project. |
|
s |
Builds and serves your app, rebuilding on file changes. |
|
t |
Runs unit tests in a project. |
|
|
Updates your application and its dependencies. See https://update.angular.io/ |
|
v |
Outputs Angular CLI version. |
WORKSPACE CONFIG FILES |
PURPOSE |
angular.json |
CLI configuration defaults for all projects in the workspace, including configuration options for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor. For details, see Angular Workspace Configuration. |
package.json |
Configures npm package dependencies that are available to all projects in the workspace. See npm documentation for the specific format and contents of this file. |
package-lock.json |
Provides version information for all packages installed into node_modules by the npm client. See npm documentation for details. If you use the yarn client, this file will be yarn.lock instead. |
src/ |
Source files for the root-level application project. |
node_modules/ |
Provides npm packages to the entire workspace. Workspace-wide node_modules dependencies are visible to all projects. |
tsconfig.json |
The base TypeScript configuration for projects in the workspace. All other configuration files inherit from this base file. For more information, see the Configuration inheritance with extends section of the TypeScript documentation. |
tslint.json |
Default TSLint configuration for projects in the workspace. |
- The Monorepo, as the name suggests mono (single) and repo (repository of the codebase) is a single source of truth for the entire organization code base.
No comments:
Post a Comment