<commit_before># Application Environments

In Angular CLI you can configure the build system to replace existing files for your intended
environment.

## Configuring available file replacements

`angular.json` contains an **fileReplacements** section within the production configuration of the
build target. By default, this looks like:

``` json
"configurations": {
  "production": {
    "fileReplacements": [
      {
        "replace": "src/environments/environment.ts",
        "with": "src/environments/environment.prod.ts"
      }
    ],
    ...
```

This means that when you use your production configuration (via `ng build --prod` or
`ng build --configuration=production`), the `src/environments/environment.ts` file will be replaced
with `src/environments/environment.prod.ts`.

This is useful for using different code or variables when creating a new build.
By default no file is replaced in the build.

You can add additional configurations as required.
To add a **staging** environment, create a copy of `src/environments/environment.ts` called `src/environments/environment.staging.ts`, then add a `staging` configuration to `angular.jsob`:

```json
"configurations": {
  "production": { ... },
  "staging": {
    "fileReplacements": [
      {
        "replace": "src/environments/environment.ts",
        "with": "src/environments/environment.staging.ts"<commit_msg>docs: fix typo "jsob" to "json"<commit_after># Application Environments

In Angular CLI you can configure the build system to replace existing files for your intended
environment.

## Configuring available file replacements

`angular.json` contains an **fileReplacements** section within the production configuration of the
build target. By default, this looks like:

``` json
"configurations": {
  "production": {
    "fileReplacements": [
      {
        "replace": "src/environments/environment.ts",
        "with": "src/environments/environment.prod.ts"
      }
    ],
    ...
```

This means that when you use your production configuration (via `ng build --prod` or
`ng build --configuration=production`), the `src/environments/environment.ts` file will be replaced
with `src/environments/environment.prod.ts`.

This is useful for using different code or variables when creating a new build.
By default no file is replaced in the build.

You can add additional configurations as required.
To add a **staging** environment, create a copy of `src/environments/environment.ts` called `src/environments/environment.staging.ts`, then add a `staging` configuration to `angular.json`:

```json
"configurations": {
  "production": { ... },
  "staging": {
    "fileReplacements": [
      {
        "replace": "src/environments/environment.ts",
        "with": "src/environments/environment.staging.ts"
{'fraction_non_alphanumeric': 0.11203170028818443, 'fraction_numerical': 0.0, 'mean_word_length': 3.9946043165467624, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3517623', 'n_tokens_mistral': 760, 'n_tokens_neox': 743, 'n_words': 270}