@joe-dev-tools/ng-env
v1.1.0
Published
The ng-env Command-Line Interface (CLI) facilitates the management of environments in Angular projects.
Downloads
1
Readme
ng-env CLI
The ng-env Command-Line Interface (CLI) facilitates the management of environments in Angular projects.
Notes:
- Execute this command in the root folder of your Angular project.
- Require Angular version 15 or higher.
- Require node version 16 or higher.
Installation
To utilize the ng-env CLI, install it globally using npm:
npm install -g @audomaro.glez/ng-env
Alternatively, you can use the npx command:
npx @audomaro.glez/ng-env [options] [command]
Alpha/Beta version
To install the alpha version, use the following command:
npm install -g @audomaro.glez/ng-env@alpha
For the beta version, use:
npm install -g @audomaro.glez/ng-env@beta
Alternatively, you can use the npx command:
npx @audomaro.glez/ng-env@alpha [options] [command]
npx @audomaro.glez/ng-env@beta [options] [command]
Usage
ng-env [command] [options]
Commands
Add
Add a new environment to the Angular project.
ng-env add -p/--project <project> -e/--environments <environments...> [--debug] [--force]
options:
- -p, --project : Specify the Angular project name.
- -e, --environments : Specify the environments.
- --debug: Optional. Create the environment for debugging purposes.
- --force: Optional. Forcefully add a new environment.
example:
ng-env add -p my-angular-app -e staging production --debug
remove
Remove existing environments from the Angular project.
ng-env remove -p/--project <project> [-e/--environments <environments...>] [--all]
options:
- -p, --project : Specify the Angular project name.
- -e, --environments [environments...]: Specify the environments to remove.
- --all: Optional. Remove all environments.
example:
ng-env remove -p my-angular-app -e staging
set-default
Set the specified environment as the default configuration for "serve" and/or "build" actions.
ng-env set-default -p/--project <project> -e/--environment <environment> -c/--configuration <configuration>
options:
- -p, --project : Specify the Angular project name.
- -e, --environment : Specify the environment.
- -c, --configuration : Specify the configuration (serve, build, or both).
example:
ng-env set-default -p my-angular-app -e production -c both
use-recommended
Set up personal recommended environments for your Angular project.
ng-env use-recommended -p/--project <project>
options:
- -p, --project : Specify the Angular project name.
example:
ng-env use-recommended -p my-angular-app